FONT Tag with Example in HTML

Advertisement

It is used to specify the size of the font being displayed. You can specify an exact size or you can specify a relative size to the base size of font.

TYPE :- Container tag.

Attributes:

Advertisement
  • a) align: It is used to specify where on the page the headline is to be displayed. Values are left, right, center and justify’. e.g. align=”left’ (default).
  • b) size: It is used to specify the size of the text. The value can be anywhere between 1 and 7. The default is 3. To make is relative font size, you can add + or – to the number. This will adjust the font relative to the base size of the font.
  • c)  face: It is used to specify the font type like Arial or Times New Roman or Verdana.
  • d) color: It is used to specify the color of the text.

Example :-
<HTML>
<HEAD>
<TITLE>Font Demo</TITLE>
</HEAD>
<BODY>
<FONT size='+2 face=='Arial, Verdana, Sans-Serif' color='blue'>
Welcome to Home Page
</FONT>
</BODY>
</HTML>

Output:-

Welcome to Home Page

 

Leave a Comment