Font Size

The Font size attribute is used to adjust the size of the text in the HTML document using a font tag with the size attribute. The range of size of the font in HTML is from 1 to 7 and the default size is 3.

Syntax:

<font size="number">

Example: This example uses the <font> tag where different font sizes are specified.

HTML




<!DOCTYPE html>
<html>
  
<body>
    <!--HTML font size tag starts here-->
    <font size="1">w3wiki!</font><br />
    <font size="2">w3wiki!</font><br />
    <font size="3">w3wiki!</font><br />
    <font size="4">w3wiki!</font><br />
    <font size="5">w3wiki!</font><br />
    <font size="6">w3wiki!</font><br />
    <font size="7">w3wiki!</font>
    <!--HTML font size tag ends here-->
</body>
  
</html>


Output:

font size attribute

HTML Tag

The HTML <font> Tag plays an important role in the web page to create an attractive and readable web page. The font tag is used to change the color, size, and style of a text and it was used in HTML4. The base font tag is used to set all the text to the same size, color, and face.

Note: Font tag is not supported in HTML5

Similar Reads

Syntax:

Content ...

Attributes:

Table of Content Font Size: Font Type: Font Color:...

Font Size

...

Font Type

The Font size attribute is used to adjust the size of the text in the HTML document using a font tag with the size attribute. The range of size of the font in HTML is from 1 to 7 and the default size is 3....

Font Color

...

Supported Browsers:

The Font type can be set by using face attribute with font tag in HTML document. But the fonts used by the user need to be installed in the system first....