Pr.Pg Next Pg

<FONT>...</FONT> tag tutorials

  • This is a paired tag element. It requires opening and closing tag.

  • <FONT> element allows you to specify different font styles for web documents. In the earlier day’s one use to had only one type of font. <FONT> allows us to use different fonts, colors and size.

  • It has following attributes.

FACE = Font names

COLOR = Hexadecimal Code or Color name

SIZE = Number


Sr No





Font names: This attribute of <FONT> allows different font in document. If the browser doesn’t find the first font name, it tries with second name, then the third name and so on. As the name of the font specified must be installed on Computer, as far as possible take fonts that are widely available on most of the Operating System.

FONTS like VERDANA, ARIAL, TIMES NEW ROMAN & COURIER are most common fonts on Windows OS while Default font for MAC is HELVETICA.



Hexadecimal code or Color name: This attribute of <FONT> allows you to specify color of font. One can give Font color by specifying Color name or by giving Hexadecimal value.



Number: This attribute of <FONT> allows you to alter SIZE of font. You can set it from value ranges from 1 to 7. By default it is 3. Values can be given in number or it can be changed by giving Plus or Minus sign in relation to BASEFONT.


For Example.

<FONT SIZE=4> Sets Font size to 4

<FONT SIZE= +2> If Base font is 3, then this will become 3+2 = 5 size

<FONT SIZE= -1> If Base font is 3, and then this will become 3-1 = 2 size.




<font attributes=value>text..




Example: HTML program to demonstrate font with different size, color and face.

Pr.Pg border                                              Next Pg