HTML Tags

HTML <basefont> Tag

The <basefont> tag was used to define a default font size, color, and font face for all text in an HTML document.
Once set, all text on the page inherited these font properties unless overridden by other tags.

Syntax

html

<basefont size="value" color="color" face="font-name">

Attributes

AttributeDescription
sizeSets the base font size (1–7 or relative values like +1)
colorSets the default text color
faceSets the default font family
(Global attributes)Not supported

Example

html

<!DOCTYPE html>
<html>
<head>
  <title>Basefont Tag Example</title>
</head>
<body>

<basefont size="4" color="blue" face="Arial">

<h2>Basefont Tag Example</h2>
<p>This paragraph follows the base font settings.</p>
<p>All text inherits size, color, and font face.</p>

</body>
</html>

Output

Browser Output

html

In older browsers, all text appears:

Blue

Larger than default

Rendered in Arial

In modern browsers, the <basefont> tag is ignored, so no styling effect is visible.

Browser Support

Chrome
Edge
Firefox
Safari
Opera
IE9+
YesYesYesYesYesYes

The tag is ignored by modern browsers.

Notes

  • <basefont> affects the entire document globally.
  • It was replaced by CSS font rules like:
  • Deprecated due to lack of flexibility and poor separation of content and style.

css

body {
  font-family: Arial;
  font-size: 16px;
  color: blue;
}

Conclusion

The <basefont> tag was an early attempt at global text styling in HTML but is now obsolete.
Modern websites should always use CSS for font control, consistency, and responsiveness.