From http://www.w3schools.com (Copyright Refsnes Data)

HTML <font> tag


The font element is deprecated.

Example

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

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

Try it yourself!


Definition and Usage

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


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The <font> tag is supported in all major browsers.


Differences Between HTML and XHTML

The font element was deprecated in HTML 4.01, and is not supported in XHTML 1.0 Strict DTD.


Tips and Notes

Tip: Use CSS to define the font face, font size, and font color of text.


Optional Attributes

DTD indicates in which 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.
Defines the color of the text in the font element.
TF
face list_of_fontnames Deprecated. Use styles instead.
Defines the font of the text in the font element.
TF
size A number from 1 to 7.
If basefont is specified you can specify a number from -6 to 6
Deprecated. Use styles instead.
Defines the size of the text in the font element.
TF

Standard Attributes

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.

Event Attributes

NONE


From http://www.w3schools.com (Copyright Refsnes Data)