HTML basefont Tag

HTML basefont Tag defines default color and font size of the text of Web Page.

Syntax of HTML basefont Tag

The Syntax of HTML basefont Tag is shown below. It is self closing tag.

<!DOCTYPE html>
<html>
<head>
<basefont color="blue" size="15">
</head>
<body>
</body>
</html>

Example of HTML basefont Tag

Simple example of basefont tag is given below.

<!DOCTYPE html>
<html>
<head>
<basefont color="blue" size="15">
</head>
<body>
<p>How To Code School</p>
</body>
</html>

In the above example as you can see, the default font size and color of text How To Code School are defined in the head section of document.

Browser Support for HTML basefont Tag

HTML Basefont Tag is not supported by any major browser including Internet Explorer. However Internet Explorer 9 or earlier versions did have a support for basefont tag.

Attributes used in HTML basefont Tag

Following Attributes are used in HTML basefont Tag.

color attribute

It is not supported in HTML5. It sets the text color of element, but we use CSS for that now.

size attribute

It defines the size of text. It is not supported in HTML5

face attribute

It defines default font for text but it is not supported in HTML5.

Support in HTML5

HTML basefont Tag is not supported in HTML5, however it was supported in HTML4.01.

HTML basefont Tag Video

Watch our video on HTML basefont Tag and subscribe our Youtube Channel.