Pages

Thursday, October 28, 2010

Text

Text can be manipulated in a many more ways than bold and italic. To begin with, they can be different sizes. To do that, we use the following tag:
<font size="1">text<font>
Above, "text" is set to size 1, which is the smallest font size. "Size" can be anything between 1 and 7. This is what they look like:
<font size="1">
<font size="2">
<font size="3">
<font size="4">
<font size="5">
<font size="6">
<font size="7">
Now, "size" is considered to be an attribute of the "font" tag. The font tag has a few other attributes, one of which is face. This is used to change the actual typeface of the text. Below is the code.
<font face="Arial">text<font>
There are many typefaces you can use, a few of which are listed below:
<font face="Arial">
<font face="Times New Roman">
<font face="Comic Sans MS">
<font face="Courier New">
<font face="Verdana">
<font face="Tahoma">
<font face="Brush Script MT">
Note that if you set the font face to a font that your site visitors do not have installed on their computers, it will revert to the default font on their system, usually Times New Roman. You can exert a bit of control over this by specifying which font(s) you would like to display if a visitor does not have your chosen font installed.
<font face="Tahoma, Verdana, sans-serif">
The above code states that if the font Tahoma is not installed, then to use Verdana instead, which is similar. It is generally recommended that you specify a font which everyone has installed, so that you can always predict how your website will look.
Another common attribute of the font tag is "color." The color can be defined in two ways, the actual name of the color, or its hexadecimal code. For example:
<font color="gray">
<font color="#808080">
<font color="red">
<font color="#FF0000">
See? "Gray" and "#808080" mean the same thing, as do "red" and "#FF0000." While using the hex codes is much harder, there is a far wider range of possible colors that will be recognised by the browser.
Finally, all of the attributes above can be put together in the same font tag. See below:
<font size="3" face="Comic Sans MS" color="#808080">
Providing an infinite range of text styles you can use for your webpages.

0 Comments:

Post a Comment