You can format the text in a webpage by setting the < font > ... < /font > tag and various font attributes. The font tag is having three attributes called size, color, and face for customize text in a webpage.

Font Face

The Font Face attribute specifies the font name of the text inside a Font tag.

When you specify a Font Face, the typeface you specify must be installed on the computer of the person viewing the web page.

The value of the face attribute can hold several font names separated by a comma.

A visitor will only be able to see your font if they have that font installed on their computer.

When your page is loaded, browser will display the first font face that it has available, otherwise second one and so on. If the specified fonts are not installed on your computer then it will load default font face of web browser. Always use double quotes around the font names.

Font Size

You can set the size of the font by changing the size attribute of < font > tag.

Above HTML code looks in a browser:


You can set font size by specify the relative font size also. That is, how many sizes larger or how many sizes smaller than the present font size.

Font Color

The Color attribute specifies the color of the text inside a Font tag. You can specify the color that you want by either the color name or hexadecimal code for that color.

You can use Face, Size and Color attributes together one < Font > tag.


HTML Source Code :


Fonts are specific to Operating systems, if you are using different Operating systems then you will have different look and feel . HTML < FONT > tag is deprecated in version 4.0 onwards.