ExampleSpecify the font size, font face and color of text: | Browser Support |
1. Definition and Usage
The <font> tag is not supported in HTML5. Use CSS instead.
The <font> element is deprecated in HTML 4.01.
The <font> tag specifies the font face, font size, and font color of text.
2. Tips and Notes
Tip: Use CSS to define the font, size, and color of text.
3. Differences Between HTML 4.01 and HTML5
The <font> tag is not supported in HTML5, and is deprecated in HTML 4.01.
4. Optional Attributes
DTD indicates in which HTML 4.01/XHTML 1.0 DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
Attribute | Value | Description | DTD |
---|---|---|---|
color | rgb(x,x,x) #xxxxxx colorname | Deprecated. Use styles instead. Specifies the color of text | TF |
face | font_family | Deprecated. Use styles instead. Specifies the font of text | TF |
size | number | Deprecated. Use styles instead. Specifies the size of text | TF |
5. Standard Attributes
The <font> tag supports the Standard Attributes in HTML.
6. Event Attributes
The <font> tag does not support any event attributes.