Saturday, 28 September 2013

Font size and Font face in HTML

Font size
Set the size of your font with size. The range of accepted values is from 1(smallest) to 7(largest).The default size of a font is 3.
HTML Code:
<font size="5">Here is a size 5 font</font>

Here is a size 5 font.

Font color
Set the color of your font with color.
HTML Code:
<font color="#990000">This text is hexcolor #990000</font>
<br />
<font color="red">This text is red</font>
Font Color:
This text is hexcolor #990000
This text is red

Font face
Choose a different font face using any font you have installed. 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. An option is to choose a few that are similar in appearance.
HTML Code:
<font face="Courier">This paragraph
 has had its font...</font>
Font Face:
This paragraph has had its font formatted by the font tag!

No comments:

Post a Comment