Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML font face Attribute

HTML face attribute

HTML font Tag Reference HTML tag

Example

Specifying the font of text:

This is some text!

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the face attribute.


Definition and Usage

HTML5 does not support tag. Please use CSS instead.

In HTML 4.01, the face attribute is deprecated.

The face attribute specifies the font of the text in the element.

**Tip:** The value of the face attribute can hold several font names as alternatives. Put the font you most want to display first in the list; when the first font is unavailable, the following alternatives are used. You should put a generic font last (serif, sans-serif, monospace, cursive, or fantasy) so that when none of the listed fonts are available, the browser can find one in its generic font library.


Compatibility notes

In HTML 4.01, The face attribute is deprecated. Please use CSS instead.

CSS syntax:

CSS example: setting the font of text

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


Syntax

Attribute values

Value Description
font_family Specifies the font of the text. To specify a priority list of several fonts, separate the font names with commas (for example ).

HTML font Tag Reference HTML tag