Basefont Tag HTML

BASEFONT- Basefont tag define the basic size for the font of which no other font size setting has been provided.

Basefont tag is used with its attribute size whose value can be from 1 to 7. Also we can use + or - sign to increase or decrease basic font size, it is a container tag that means it requires starting as well as ending tag.

<HTML>
<HEAD>
<TITLE>
Title of the document
</TITLE>
</HEAD>
<BODY>
This text is being displayed in default font size.
<BASEFONT SIZE =5>
This text has base font size 5
<BASEFONT SIZE =+2>
This text has relatively 40% bigger size than the earlier one
<BASEFONT SIZE =-1>
This text has relatively 20% smaller size than the earlier one
</BODY>
</HTML>
*Note BASEFONT tag is not supported by new web browser.

Attributes of BASEFONT Tag
  • Size
  • Face
  • Color 
Size- Using Size attribute of BASEFONT tag we can specify the size of basic font and its value can be from 1-7. Also we can use + or - symbol to increase or decrease basic font size.

<HTML>
<HEAD>
<TITLE>
Title of the document
</TITLE>
</HEAD>
<BODY>
This text is being displayed in default font size.
<BASEFONT SIZE =5>
This text has base font size 5
<BASEFONT SIZE =+2>
This text has relatively 40% bigger size than the earlier one
<BASEFONT SIZE =-1>
This text has relatively 20% smaller size than the earlier one
</BODY>
</HTML>
*Note BASEFONT tag is not supported by new web browser.

Face- Using Face attribute of BASEFONT tag we can change basefont face according to our choice.

<HTML>
<HEAD>
<TITLE>
Title of the document
</TITLE>
</HEAD>
<BODY>
This text is being displayed in default font size.
<BASEFONT Face ="Arial">
This text is being displayed in arial font face
</BODY>
</HTML>
*Note BASEFONT tag is not supported by new web browser.

Color- Using Color attribute of BASEFONT tag we can specify the color of basic font.

<HTML>
<HEAD>
<TITLE>
Title of the document
</TITLE>
</HEAD>
<BODY>
This text is being displayed in default font size.
<BASEFONT COLOR ="red">
This text is being displayed in red color
</BODY>
</HTML>
*Note BASEFONT tag is not supported by new web browser.