Easy Tutorial
❮ Att Pre Width Att Col Char ❯

HTML <font> face Attribute

HTML <font> Tag

Example

Specifies the font of the text:


Browser Support

All major browsers support the face attribute.


Definition and Usage

In HTML 4.01, the face attribute of <font> has been deprecated.

The face attribute specifies the font for the text in the <font> element.

Tip: The value of the face attribute can hold several font names as alternatives. Place the font you most want to display first in the list. When the first font is not available, use the subsequent alternative fonts. You should put a generic font at the end (serif, sans-serif, monospace, cursive, or fantasy) so that when the previously listed fonts are not available, the browser can find the font in the generic font library.


Compatibility Notes

In HTML 4.01, the face attribute of <font> is deprecated. Use CSS instead.

CSS Syntax: <p style="font-family: verdana">

CSS Example: Setting the font of the text

In our CSS tutorial, you can find more details about the font-family property.


Syntax

Attribute Values

Value Description
font_family Specifies the font of the text. To specify a priority list of fonts, use commas to separate font names (e.g., <font face="verdana,arial,sans-serif">).

❮ Att Pre Width Att Col Char ❯