<basefont>
HTML <basefont> Tags - HTML5 Not supported
##Instance
Run instance»Click the "Run instance" button to view the online 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
##Only IE 9 and earlier versions of IE browsers support the <basefont> tag. This label should be avoided.
Tag definition and usage instructionsHTML5 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 NotesTips:
Use CSS to specify default colors, sizes, and fonts for text in your document.
Differences between HTML 4.01 and HTML5HTML5 does not support the <basefont> tag, and HTML 4.01 has deprecated the <basefont> tag.
Optional attributesValue | Description | |
---|---|---|
color | HTML5 is not supported. HTML 4.01 is deprecated. | Specifies the default color for text in the document. |
font_family | HTML5 Not supported. HTML 4.01 is deprecated. | Specifies the default font for text in documents. |
number | HTML5 Not supported. HTML 4.01 is deprecated. | Specifies the default size for text in documents. |
Standard attributes
In HTML 4.01, the <basefont> tag supports the following standard attributes:
Value | Description | |
---|---|---|
classname | Specifies the class name of the element | |
rtl | ltrSpecifies the text direction of the content in the element | |
id | Specifies the uniqueness of the element id | |
language_code | Specifies the language code of the content in the element | |
style_definition | Specifies the inline style of the element | |
text | Specifies additional information for elements |