HTML Tags – Basefont Tag

What is HTML <basefont> tag ?

HTML <basefont> tag is used to set default font face, size, and color for text inside the webpage.

HTML <basefont> tag is used in both head and body section.

HTML <basefont> tag was used in HTML4 specification.

HTML <basefont> tag is removed in HTML5 specification.

Why HTML <basefont> tag is used ?

HTML <basefont> tag was used in HTML4 for setting default font face, size, and color for all elements.

In HTML5, We can use use CSS properties such as font, font-family, font-size, and color to change the font configuration for text elements.

HTML coding for a website !!!

Click to Learn More about – HTML Tutorial for beginners

Syntax :

<basefont size="14" color="green"/>

Example :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
  <title>HTML basefont tag</title>
  <basefont size="14" color="green"/>
  <p>HTML basefont tag</p>

Output :

<basefont> Tag Attributes

HTML <basefont> tag support following specific attributes.

1color#XXXXXXDefine a base URL link.
2targetfontnameDefine a default font face.
3sizesizeDefine a default font size.

Browser Compatibility

6Internet ExplorerNo