Name

basefont — HTML 4.01

Synopsis

HTML: <basefont>; XHTML: <basefont/> or <basefont />

Specifies certain font attributes for the content that follows it. It can be used within the head element to apply to the entire document or within the body of the document to apply to the subsequent text. This element is strongly discouraged from use in favor of style sheets for font control.

Notes

Deprecated in HTML 4.01 and XHTML 1.0. Not in HTML5.

Start/End Tags

This is an empty element. In HTML, the end tag is forbidden. In XHTML, the element must be closed with a trailing slash as just shown.

Attributes

id="text"

Assigns a name to an element. This name must be unique in a document.

color="#rrggbb" or "color name"

Deprecated. Sets the color of the following text.

face="typeface" (or list of typefaces)

Deprecated. Sets the font for the following text.

size="number"

Deprecated. Sets the base font size using size values from 1 to 7 (or relative values based on the default value of 3). Subsequent relative size settings are based on this value.

Example (HTML)

<head>
    <basefont face="Verdana, Helvetica, sans-serif">
</head>

Example (XHTML)

<head>
    <basefont face="Verdana, Helvetica, sans-serif" />
</head>

Get HTML & XHTML Pocket Reference, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.