This deprecated, presentational element is not recommended. Authors should generally find an alternative way to accomplish the same task while adhering to all best practices, or simply do without it if it is unimportant.

The HTML <font></font> element has been deprecated since HTML4 in favor of CSS font properties. It was used to render the font color, font size, and font face for the selected text. It is now obsolete in HTML5.


Attribute Value Description
face font name Allows selection of font face for the text. Ex. Arial, Eurostile, Courier, etc. See font-family.
color color Allows selection of the font color. Valid color names or color codes are accepted. See color.
size number Allows selection of font size through number value. A plus sign (+) or minus sign (-) may be added in front of the number for a font size one level bigger, one level smaller, etc. See font-size.
Global Attributes

See Global HTML Attributes.

HTML example:

<font face="Eurostile" color="green" size="20">Font element in action.</font>

That generates: Font element in action.

For font face names that contain more than one word, make sure they are contained in double quotes (""), so that it will be rendered correctly.

<font face="Arial Black">TEXT</font>

External Links