
|
 |
 |

Browsers are only able to display the fonts that are available on the visitor's computer. That is why you should only set the typeface to common fonts such as Times Roman, Arial, Verdana, Geneva, etc. If your design requires a fancy font you will need to use an image to represent the text. This leads to the discussion of the FONT tag which is used to set the color, size, and typeface of text. Keep in mind that the font tag has been depreciated in favor of Cascading Style Sheets, but it still commonly used and is worth learning.
Color
Setting the color in the body tag will apply that color to the entire document, if you wanted to apply color to specific text you will need to do so using the font tag. To apply color just place desired text inbetween the font tag and use the color attribute as so:
<FONT COLOR="#FF0000"> This text will show up red. </FONT>
Face
Use the face attribute to set the font type of specific text. As before your browser will only display a font that the visitor has on his/her own computer, this is why the face attribute allows a list of different font names. The browser will display the first font that is found on the visitor's computer. Remember to separate each font name by a comma. Here is an example:
<FONT FACE="verdana, arial, helvetica"> Sentence will display in first font found on users computer, if verdana font is not found, the browser will look for arial, and then Helvetica. If neither are found it will display user's default font. </FONT>
Size
You can write the size of text in either relative or absolute terms. The default font size is size="3". Size="3" is an absolute term, because you are specifying the precise size you wish to use. There are seven font sizes to choose from: 1-7. When you use relative terms you are always referring to the default size and adding or subtracting from this size. For example size="+2" is the same as size="5". You can combine different sized words on the same line.
© Copyright 2000-2002 by Pepmint.com. All Rights Reserved |
 |
 |
CSS Tutorial
 |