HTML <basefont> tag

(Not Supported in HTML5)

HTML <basefont> tag was used to specify the default value of font-size, color, and font-family for all content written within an HTML document.

Note: The <basefont> was deprecated in HTML 4 and completely removed from HTML5 so do not use this tag, instead of it you can use CSS to style the document.

Syntax

In HTML the closing tag </basefont> is not required but in XHTML the end tag is required.

Following are some specifications about the <base> tag

DisplayNone (empty tag)
Start tag/End tagOnly start-tag
UsageFont styling

Example

Test it Now

Right way is to Use CSS to set the base font:

Test it Now

Attributes

Tag specific attributes:

AttributeValueDescription
colorcolorSpecify the default color of all text within an HTML document. (Not Supported in HTML5)
facefont-familySpecify the default font face for the text in the document. (Not Supported in HTML5)
sizenumberSpecify the size of the text. (Not Supported in HTML5)

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<basefont>NoNoNoNoNo
Next TopicHTML bdi Tag




Latest Courses