HTML Fonts

Fonts


Font face and color depends entirely on the computer and browser that is being used to view your page. But the <font> tag is used to add style, size, and color to the text on your site. You can use a <basefont> tag to set all of your text to the same size, face, and color.

The font tag is having three attributes called size, color, and face to customize your fonts.

To change any of the font attributes at any time within your page, simply use the <font> tag. The text that follows will remain changed until you close with the </font> tag. You can change any or all of the font attributes at the one time, by including all the required changes within the one <font> tag.

Font Size

You can set the size of your font with size attribute. The range of accepted values is from 1(smallest) to 7(largest). The default size of a font is 3.

Example:

<font size="1">Font size="1"</font>
<font size="2">Font size="2"</font>
<font size="3">Font size="3"</font>
<font size="4">Font size="4"</font>
<font size="5">Font size="5"</font>
<font size="6">Font size="6"</font>
<font size="7">Font size="7"</font>

This will produce following result:

Font size="1"
Font size="2"
Font size="3"
Font size="4"
Font size="5"
Font size="6"
Font size="7"

SPECIFY THE RELATIVE FONT SIZE. <font size="+n"> or <font size="-n">:
You can specify how many sizes larger or how many sizes smaller than the preset font size should be.

Example:

<font size="-1">Font size="-1"</font>
<font size="+1">Font size="+1"</font>
<font size="+2">Font size="+2"</font>
<font size="+3">Font size="+3"</font>
<font size="+4">Font size="+4"</font>

This will produce following result:

Font size="-1"
Font size="+1"
Font size="+2"
Font size="+3"
Font size="+4"

Font Face

You can set any font you like using face attribute but be aware that if the user viewing the page doesn't have the font installed, they will not be able to see it. Instead they will default to Times New Roman of your font with size attribute.

Example:

<font face="Times New Roman" size="5">Times New Roman</font>
<font face="Verdana" size="5">Verdana</font>
<font face="Comic sans MS" size="5">Comic Sans MS</font>
<font face="WildWest" size="5">WildWest</font>
<font face="Bedrock" size="5">Bedrock</font>

This will produce following result:

Times New Roman
Verdana
Comic Sans MS
WildWest
Bedrock

Specify alternate font faces

A visitor will only be able to see your font if they have that font installed on their computer. So, it is possible to specify two or more font face alternatives by listing the font face names, separated by a comma.

Example:

<font face="arial,helvetica">
<font face="Lucida Calligraphy,Comic Sans MS,Lucida Console>

When your page is loaded, their browser will display the first font face that it has available. If none of your selections are installed....then it will display the default font face Times New Roman.

Font Color

You can set any font color you like using color attribute. You can specify the color that you want by either the color name or hexadecimal code for that color.

Example:

<font color="#FF00FF">This text is hexcolor #FF00FF</font>
<font color="red">This text is red</font>

This will produce following result:

This text is hexcolor #FF00FF
This text is red


Home Colors Forms



1