Language References
Sets the base or default font size in a document. | HTML 2, 3.2, 4, 4.01 Deprecated |
HTML Syntax
<basefont
color = color
face = font
size = n
>
The BASEFONT element sets the base font size of a page, using the size attribute.
All subsequent font settings with the FONT element, such as size=" +1" or size="-1", are relative to this base font size. If <basefont
> is not set, the default base font size is 3.
If the user has set a default font size in the browser’s preferences, this element overrides it.
<basefont
> can be used anywhere in the HEAD or BODY of a document to change the base font, and you can use it multiple times to change the base font in different parts of the document.
Of course, the element must appear before any of the text that is to be rendered.
The base font size does not apply to headings ( h1 to h6 ), except where these are modified using the <font
> element with a relative font size change.
NOTE: Only the <basefont
> start tag must be present. The element has no end tag.
NOTE: This element has been deprecated in favor of CSS stylesheets.
The <basefont
> element supports the following attributes, in addition to global attributes common to all HTML elements.
Attribute | Value | Description |
color | color | Sets the default color for text in a document. |
face | font-family | Sets the default font face for text in a document. |
size | number | Sets the default size of the font in a document. |
The following example uses <basefont
> to set the default font size to 2, then enlarges and decreases the font size using the <font
> element.
All changes made to the font size are relative to the base font size, which is 2.
<basefont size="2">BASEFONT lets the user select a comfortable base font size,
but this can be reset for all or part of a page. <font size="+3">Doing so causes subsequent font size
changes</font><font size="-1"> to execute relative to the new base font size.</font>
which would render as
BASEFONT lets the user select a comfortable base font size, but this can be reset for all or part of a page. Doing so causes subsequent font size changes to execute relative to the new base font size.
FONT