Advertisement

HTML <basefont> tag

Examples

Predetermined default font color and font size on the page:

<head>
<basefont color="red" size="5" />
</head>

<body>
<h1>This is a header</h1>
<p>This is a paragraph</p>
</body>

Try it yourself

Browser Support

IE Firefox Chrome Safari Opera

Only Internet Explorer supports the <basefont> tag. You should avoid using the label.

Definition and Usage

<Basefont> tag defines the base font. The label can be the default font color, font size and font family for all text in the document definition.

Differences between HTML and XHTML

In HTML 4.01 deprecated basefont element; in XHTML 1.0 Strict DTD not supported basefont elements.

Optional attributes

Attributes value description
color
  • rgb (x, x, x)
  • #xxxxxx
  • colorname

Deprecated. Use styles instead.

Provisions of the document default text color.

face font_family

Deprecated. Use styles instead.

The default font specified in the document.

size number

Deprecated. Use styles instead.

Provisions of the document default font size.

Standard property

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard property .

Event Properties

NONE