You are here: Reference > HTML > attributes > face (basefont, font)

face attribute (basefont, font)

Browser support:
Specifies the font face for a page or for a font element.
This attribute is deprecated. Use the font-family style property instead. You can find a detailed description there.
JavaScript page for this attribute: face. You can find other example(s) there.

Possible values:

String that sets a comma-separated list of font names.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the face attribute:
Original font face
<basefont size="4" face="sans-serif" />Font face for the whole page
<font face="Arial" size="2">modified with FONT element</font>
Normal text fragment in the document body
Did you find this example helpful? yes no

Example HTML code 2:

Recommendation:
<body style="font-family:sans-serif; font-size:14px">
    Font face for the whole page
    <span style="font-family:arial; font-size:10px">
        modified with SPAN element
    </span>
    Normal text fragment in the document body
</body>
Did you find this example helpful? yes no

Supported by tags:

External links:

User Contributed Comments

Post Content

Post Content