<font>
HTML <font> Tags - HTML5 Not supported
##Instance
Run instance»Click the "Run instance" button to view the online 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
##All major browsers support the <font> tag.
Tag definition and usage instructionsHTML5 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 NotesTips:
Please use CSS to define the font, size, and color of the text.
Differences between HTML 4.01 and HTML5HTML5 does not support the <font> tag, and HTML 4.01 has deprecated the <center> tag.
Optional attributesValue | Description | |
---|---|---|
rgb(x,x,x) |
#xxxxxx
Colorname | #HTML5 is not supported. HTML 4.01 is deprecated. Specifies the color of the text. |
font_family | HTML5 Not supported. HTML 4.01 is deprecated. | Specifies the font of the text. |
number | HTML5 Not supported. HTML 4.01 is deprecated. | Specifies the size of the text. |
Standard attributes
In HTML 4.01, the <font> tag supports the following standard attributes:
Value | Description | |
---|---|---|
classname | Specifies the class name of the element | |
rtl | ltrSpecifies the text direction of the content in the element | |
id | Specifies the uniqueness of the element id | |
language_code | Specifies the language code of the content in the element | |
style_definition | Specifies the inline style of the element | |
text | Specifies additional information for elements |