Skip to content
Related Articles

Related Articles

Improve Article

HTML | <font> size Attribute

  • Last Updated : 28 May, 2019

The HTML <font> size Attribute is used to specify the size of text which is present inside <font> element.

Syntax:

<font size="number">

Attribute Values: It contains single value number which specifies the size of text. The font size lies between 1 to 7. The default value of font size is 3.

Note: The <font> size attribute is not supported by HTML 5.

Example:






<!DOCTYPE html>
<html>
  
<head>
    <title>HTML font size Attribute</title>
</head>
  
<body>
    <font size="1">GeeksforGeeks!</font>
    <br />
    <font size="2">GeeksforGeeks!</font>
    <br />
    <font size="3">GeeksforGeeks!</font>
    <br />
    <font size="4">GeeksforGeeks!</font>
    <br />
    <font size="5">GeeksforGeeks!</font>
    <br />
    <font size="6">GeeksforGeeks!</font>
    <br />
    <font size="7">GeeksforGeeks!</font>
</body>
  
</html>

Output:

Supported Browsers: The browser supported by HTML <font> size attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :