English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The HTML tag <basefont> is used to set the default font size of the document. You can change the font size relative to the default size using <font>.
Do not use this tag anymore!
Define the default color and size of text on the page:
<head> <basefont color="red" size="5" /> </head> <body> <h1>This is a heading</h/h1> <p>This is a paragraph.</p>/p> </body>Test and see ‹/›
IEFirefoxOperaChromeSafari
Only IE 9 And earlier versions of IE browsers support the <basefont> tag. It is recommended to avoid using this tag.
HTML5 The <basefont> tag is not supported. Please use CSS instead.
In HTML 4.01 In HTML, the <basefont> element is deprecated.
The <basefont> tag defines the default color, size, and font for all text in the document.
Tip:Define the default color, size, and font of text in the document using CSS.
HTML5 The <basefont> tag is not supported, HTML 4.01 The <basefont> tag is deprecated.
Attribute | Value | Description |
---|---|---|
color | color | HTML5 Not supported. HTML 4.01 Deprecated. specify the default color of the text in the document |
face | font_family | HTML5 Not supported. HTML 4.01 Deprecated. specify the default font of the text in the document |
size | number | HTML5 Not supported. HTML 4.01 Deprecated. specify the default size of the text in the document |
In HTML 4.01 In the <basefont> tag supports the following standard attributes:
Attribute | Value | Description |
---|---|---|
class | classname | specify the class name of the element |
dir | rtl ltr | specify the text direction of the content within the element |
id | id | specify the unique id of the element |
lang | language_code | specify the language code for the content within the element |
style | style_definition | specify the inline style of the element |
title | text | specify additional information about the element |
For a complete description, please visitStandard Attributes.
In HTML 4.01 where, the <basefont> tag does not support any event attributes.
For a complete description, please visitEvent Attributes.