HTML Tags
Advertisements

HTML <basefont> Tag Not Supported in HTML5

Topic: HTML5 Tags ReferencePrev|Next

Description

The <basefont> tag specifies the base font i.e. default font-color, font-size, or font-family for all the text in an HTML document.

The following table summarizes the usages context and the version history of this tag.

Parent: <head>
Content: None. It is an empty element.
Start/End Tag: Start tag: required, End tag: forbidden
Version: HTML 2, 3.2, 4, 4.01 (transitional)

Warning: Don't use this tag since it is a non-standard tag and has been deprecated in HTML 4.01 and obsolete since HTML5. Use CSS font's properties, instead.


Syntax

The basic syntax of the <basefont> tag is given with:

HTML:<basefont>; XHTML:<basefont />

The example below shows the <basefont> tag in action.

<head>
    <title>The HTML Document</title>
    <basefont color="red" size="5" face="arial, sans-serif">
</head>

Tag-Specific Attributes

The following table shows the attributes that are specific to the <basefont> tag.

Attribute Value Description
color color Obsolete Sets the default color for text in a document.
face font-family Obsolete Sets the default font face for text in a document.
size number Obsolete Sets the default size of the font in a document.

Browser Compatibility

The <basefont> tag is not supported in Firefox and Opera.

Browsers Icon

Basic Support—

  • Firefox ×
  • Google Chrome ×
  • Internet Explorer 5.5+
  • Apple Safari ×
  • Opera ×

Further Reading

See tutorial on: CSS Fonts.

Related tag: <font>.

Advertisements
Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties