<basefont> (Base Font)
This element establishes a default font size for a document. Font size then can be varied relative to the base font size using the <font> element.
Syntax (Transitional Only)
<basefont
color="color name | #RRGGBB"
face="font name(s)"
id="unique alphanumeric identifier"
size="1-7 | +/-int" /;>
Events Defined by Internet Explorer
onlayoutcomplete, onmouseenter, onmouseleave, onreadystatechange
Element-Specific Attributes
- color
- This attribute sets the text color using either a named color or a color specified in the hexadecimal #RRGGBB format.
- face
- This attribute contains a list of one or more font names. The document text in the default style is rendered in the first font face that the client's browser supports. If no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system.
- size
- This attribute specifies the font size as either a numeric or relative value. Numeric values range from 1 to 7 with 1 being the smallest and 3 the default.
Example
<basefont color="#FF0000" face="Helvetica" size="+2" />
Compatibility
HTML 2, 3.2, 4, 4.01, and XHTML 1.0, 1.1, Basic
Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 2, 3, 4 5.5-4.8
Notes
HTML 3.2 supports the basefont element but only with the size attribute.
The strict HTML and XHTML specifications do not support this element.
Despite being part of transitional standards, some standards-focused browsers like Mozilla and Opera do not support this element.
This element can be imitated with a CSS rule on the body element.
XHTML 1.0 requires a trailing slash for this element: <basefont />.