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.

⚠️ The <basefont> tag is deprecated and not supported in HTML5.
Modern web development uses CSS for controlling typography.

Syntax

<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

<!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

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
Chrome
Firefox
Firefox
Edge
Edge
Safari
Safari
Opera
Opera
IE
IE9+
❌No❌No❌No❌No❌No⚠️Partial

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.
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.

Sign In Form

User your email and password to singn in

Don’t have an account, signup here : 

HTML5 & CSS3

Tools and Tutorials

Want a Website

Want a website for your business ?

Please fill out the details below, so we can reach out to you.

Registration Form

Signup to track your record and much more.

We have sent you an email with a registration link. Please click the link to verify your email address, or enter the 6-digit OTP provided in the email.

Didn't receive the OTP. Regenerate OTP Resend