English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The HTML <font> element ( <font>) defines the font size, color, and presentation of the content. This feature has been removed from the Web standard, although some browsers still support it, it may stop supporting it in the future. Please do not use this feature as much as possible.
Specify the text size, font, and color:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Basic Tutorial(oldtoolbag.com)</title> </head> <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>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the <font> tag.
HTML5 The <font> tag is not supported. Please use CSS instead.
In HTML 4.01 In HTML, the <font> element is deprecated.
The <font> tag specifies the font, font size, and font color of the text.
Tip:Please use CSS to define the text'sFont, size, and color.
HTML5 The <font> tag is not supported, HTML 4.01 The <center> tag is deprecated.
Attribute | Value | Description |
---|---|---|
color | rgb(x,x,x) #xxxxxx colorname | HTML5 Not supported. HTML 4.01 Deprecated. specify the color of the text. |
face | font_family | HTML5 Not supported. HTML 4.01 Deprecated. specify the font of the text. |
size | number | HTML5 Not supported. HTML 4.01 Deprecated. specify the size of the text. |
In HTML 4.01 In the <font> tag supports the following standard attributes:
Attribute | Value | Description |
---|---|---|
class | classname | specify the class name of the element |
dir | rtl ltr | specify the text direction of the content within the element |
id | id | specify the unique id of the element |
lang | language_code | specify the language code of the content within the element |
style | style_definition | specify the inline style of the element |
title | text | specify additional information about the element |
For a complete description, please visitStandard Attributes.
In HTML 4.01 where, the <font> tag does not support any event attributes.
For a complete description, please visitEvent Attributes.