Javatpoint Logo
Javatpoint Logo

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

Display None (empty tag)
Start tag/End tag Only start-tag
Usage Font styling

Example

Test it Now

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

Test it Now

Attributes

Tag specific attributes:

Attribute Value Description
color color Specify the default color of all text within an HTML document. (Not Supported in HTML5)
face font-family Specify the default font face for the text in the document. (Not Supported in HTML5)
size number Specify 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




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA