|
font-family sets the over all font to use for the element. You can specify either a specific font, such as Helvetica or Arial, or a generic font-family. You can't tell which fonts will be available on the user's computer, so font-family allows you to list a series of choices, separated by commas. The web browser uses the first font in the list that it understands.
So, for example, the following code (in a STYLE tag or in a style sheet file) indicates that <H2 ...>Lucida Casual if that font is available. If it isn't, the browser should try Comic Sans MS.
H2
{
font-family:'Lucida Casual', 'Comic Sans MS';
}
which gives us this <H2 ...>
![]() Interpretations of the five generic font families. Only the first three are widely supported. |
![]() Serifs are small accentuations added to font characters to make them more readable. Fonts such as Times New Roman and Book Antiqua use serifs. Fonts that don't have serifs are often called "sans-serif" ("sans" is French for "without"). Arial and Helvetica are popular sans-serif fonts. |
Generic font families are all the font control you need in most situations. However, if you particularly want a specific font, the best technique is to combine named fonts with generic font families. For example, you could use several cursive style fonts, ending the list with the cursive generic font family:
H2.multi
{
H1 {font-family:'Brush Script MT',Phyllis,'Lucida Handwriting',cursive;}
}
which gives us an <H2 ...>
|
Recommended Resources |
|||
| web hosting tutorials Credit Help |
Search the Internet Search Engine Help |
Low Fat Lifestyle Internet Traffic |
Web
Hosting Web Design |
|
Discount
Hotel Reservations All
Rights Reserved, Copyright © Free-HTML-Tutorials.com 2003 |
|||