HTML <basefont> tag

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

When writing in HTML (hypertext markup language), 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, and related attributes and browser compatibility.

Note

The <basefont> tag is no longer supported; CSS (cascading style sheets) 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

All HTML tags support standard attributes that define the settings of an HTML element. In addition to the standard settings, the <basefont> tag has the following unique attributes.

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