Login

Username:

Password: 

Join us Now |  Forgot Password? | Forgot UserName?

HTML

Learn step by step



HTML Fonts

Font face and color depends entirely on the computer and browser that is being used to view your page. <font> tag is used to implement font style, size, and color for the site. You can use a <basefont> tag to set all texts with same font size, face, and color.
The font tag contains three attributes - size, color, and face to customize 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/all of the font attributes by including all the required attribute within the one <font> tag.
NOTE:The font and basefont tags are deprecated in HTML5. It is suggested to use css styles to manipulate your font.

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.


<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>
Run

SPECIFY 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.


<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> Run

Font Face:

You can set any font type you like using face attribute but if 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. See below few examples on using different font face


<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>
Run

Specify alternate font faces:

A visitor will only be able to see 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.

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

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

Font Color:

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


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



Related Videos