basefont

FilterElements

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

Deprecated. Not in HTML5. 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.

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.

Specifications

  • HTML 4.01

id=

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

color=

Values: #rrggbb or color name
Deprecated. Sets the color of the following text.

face=

Values: Typeface (or list of typefaces)
Deprecated. Sets the font for the following text.

size=

Values: 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.
HTML
<head>
  <basefont face="Verdana, Helvetica, sans-serif">
</head>
XHTML
<head>
  <basefont face="Verdana, Helvetica, sans-serif" />
</head>

Rendered Example

The example above sets the default font for the whole document to Verdana (or Helvetica if Verdana is not available).