<font>


HTML <font> Tags - HTML5 Not supported

##Instance

<!DOCTYPE html>
<html>
<body>

<p><font size="3" color="red">This is some text!</font></p>

<p><font size="2" color="blue">This is some text!</font></p>

<p><font face="verdana" color="green">This is some text!</font></p>

</body>
</html>

Run instance»Click the "Run instance" button to view the online instance


Browser support

1000.png ##All major browsers support the <font> tag.

Tag definition and usage instructions

HTML5 does not support the <font> tag. Please use CSS instead.

In HTML 4.01, the <font> element is deprecated.

<font> tag specifies the font, font size, and font color of the text.

Tips and Notes

Tips:

Please use CSS to define the font, size, and color of the text.

Differences between HTML 4.01 and HTML5

HTML5 does not support the <font> tag, and HTML 4.01 has deprecated the <center> tag.

Optional attributes

Attributescolorrgb(x,x,x)#HTML5 is not supported. HTML 4.01 is deprecated. facefont_familyHTML5 Not supported. HTML 4.01 is deprecated. sizenumberHTML5 Not supported. HTML 4.01 is deprecated.
ValueDescription
#xxxxxx Colorname

Specifies the color of the text.
Specifies the font of the text.
Specifies the size of the text.

Standard attributes

In HTML 4.01, the <font> tag supports the following standard attributes:

Attributesclassclassnamedir ltrididlanglanguage_codestylestyle_definitiontitletext

For a complete description, please visit the standard properties.


Event attributes

In HTML 4.01, the <font> tag does not support any event attributes.

For a complete description, visit the event properties.


ValueDescription
Specifies the class name of the element
rtl
Specifies the text direction of the content in the element
Specifies the uniqueness of the element id
Specifies the language code of the content in the element
Specifies the inline style of the element
Specifies additional information for elements