HTML <basefont> tag

Updated: 11/13/2018 by Computer Hope
HTML basefont tag

When writing in HTML, the <basefont> tag was used to designate the default font-family, font-size, and color for all text within a document. The following sections contain information about this tag, including an example of it in use, as well as related attributes and browser compatibility.

Note

The <basefont> tag is no longer supported; CSS should be used instead.

Example code

<head>
  <basefont color="#orange" face="Arial" size="16 px" />
</head>

<p>This text is orange, 16 pixels in size, and Arial font.</p>

The above code, rendered in a web browser:

This text is orange, 16 pixels in size, and Arial font.

Attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair. The <basefont> tag is no longer supported, but at one time it used the attributes contained in the following table.

Attribute Description
color Designates the default text color.
face Designates the default font face for text.
size Designates the default text size.

Compatibility

Edge Internet Explorer Firefox Safari Opera Chrome
Not Supported Not Supported Not Supported Not Supported Not Supported Not Supported

Browser, Compatibility, Font, Optimized, Web design terms