Name

font — HTML 4.01

Synopsis

<font> . . . </font>

An outdated method for affecting the style (color, typeface, and size) of the enclosed text. This element is no longer used in professional web design in favor of style sheets for changing text appearance.

Notes

Deprecated in HTML 4.01/XHTML 1.0; Not in HTML5.

Start/End Tags

Required/Required

Attributes

Core, Internationalization

color="#RRGGBB" or "color name"

Deprecated. Not in HTML5. Specifies the color of the enclosed text.

face="typeface" (or list of typefaces)

Deprecated. Not in HTML5. Specifies a typeface for the text. The specified typeface is used only if it is found on the user’s machine. You may provide a list of fonts (separated by commas), and the browser will use the first available font in the string.

size="value"

Deprecated. Not in HTML5. Sets the size of the type to an absolute value on a scale from 1 to 7 (3 is the default) or by using a relative value + n or - n (based on the default or basefont setting).

Example

<font face="serif" size="+1" color="red">Obsolete.</font>

Get HTML & XHTML Pocket Reference, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.