<basefont>


HTML <basefont> Tags - HTML5 Not supported

##Instance

<!DOCTYPE html>
<html>
<head>
<basefont color="red" size="5">
</head>

<body>
<h1>This is a header</h1>
<p>This is a paragraph</p>

<p>The basefont element was deprecated in HTML 4, and is not supported in HTML 4.01 Strict DTD or in XHTML 1.0 Strict DTD. Use CSS instead.</p>

</body>
</html>

Run instance»Click the "Run instance" button to view the online instance


Browser support

1000.png ##Only IE 9 and earlier versions of IE browsers support the <basefont> tag. This label should be avoided.

Tag definition and usage instructions

HTML5 does not support the <basefont> tag. Please use CSS instead.

In HTML 4.01, the <basefont> element is deprecated. The

<basefont> tag defines the default color, size, and font for all text in the document.

Tips and Notes

Tips:

Use CSS to specify default colors, sizes, and fonts for text in your document.

Differences between HTML 4.01 and HTML5

HTML5 does not support the <basefont> tag, and HTML 4.01 has deprecated the <basefont> tag.

Optional attributes

AttributescolorcolorHTML5 is not supported. HTML 4.01 is deprecated. facefont_familyHTML5 Not supported. HTML 4.01 is deprecated. sizenumberHTML5 Not supported. HTML 4.01 is deprecated.
ValueDescription
Specifies the default color for text in the document.
Specifies the default font for text in documents.
Specifies the default size for text in documents.

Standard attributes

In HTML 4.01, the <basefont> tag supports the following standard attributes:

Attributesclassclassnamedir ltrididlanglanguage_codestylestyle_definitiontitletext

For a complete description, please visit the standard properties.


Event attributes

In HTML 4.01, the <basefont> tag does not support any event attributes.

For a complete description, visit the event properties.

ValueDescription
Specifies the class name of the element
rtl
Specifies the text direction of the content in the element
Specifies the uniqueness of the element id
Specifies the language code of the content in the element
Specifies the inline style of the element
Specifies additional information for elements