Tag <font> HTML Reference



Example

Specify the font size, font face and color of text:

<font size="2" color="red">This is some text!</font>
<font size="4" color="green">This is some text!</font>
<font face="verdana" color="green">This is some text!</font>

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

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.


Relative articles