HTML <font> tag

Updated: 09/12/2023 by Computer Hope
HTML font tag

When writing in HTML (hypertext markup language), the <font> tag was an inline element used to change certain qualities of a block of text on a web page. It was useful for changing a font's size, face, and color. The following sections contain information about this tag, including an example of it in use, and related attributes and browser compatibility.

Note

The <font> tag is not supported going forward; CSS (cascading style sheets) should be used instead.

Example of <font> code

<font size="4" color="Green">Words and things.</font>
<font size="2" color="#c1c1c3">Text that looks different.</font>
<font face="Arial" color="Orange">I am a sentence!</font>

Example result

Words and things. Text that looks different. I am a sentence!

Attributes

All HTML tags support standard attributes that define the settings of an HTML element. In addition to the standard settings, the <font> tag had the following unique attributes.

Attribute Description
color Designates the color of text.
face Designates the look of text.
size Designates the size of text.

Compatibility

Edge Internet Explorer Firefox Safari Opera Chrome
All versions* All versions * All versions * All version * All versions * All versions *

*Until it is removed in a future version of HTML

Block of text, Browser, Compatibility, Container tag, Font, Web design terms