HTML and CSS Reference
In-Depth Information
are encouraged to place a generic font family name as the last fallback choice.
Most browsers recognize the generic font family names listed in Table 3.1.
Table 3.1: Font families recognized by most browsers
Family Name
Properties
Examples
sans-serif
Proportional, without
serifs
Helvetica, Arial, Geneva,
Verdana, Tahoma
serif
Proportional, with serifs
Times, Times New Roman,
Georgia, Bookman Old Style
monospace
Fixed-width; code or
typewriter style
Courier, Courier New,
Monaco, Andale Mono
cursive
Curved strokes;
handwriting style
Comic Sans MS, Lucida
Handwriting
fantasy
Anything unusual
Papyrus, Klingon
To test your browser's styling of these generic font families, copy the code
shown in Example 3.4 into the body of an HTML ile or anywhere else you can
enter HTML code to create a page you can display. Figure 3.4 shows how this
code rendered in my browser.
Example 3.4: HTML code for displaying generic font families
<p style="font-size: 14pt">
<span style="font-family:sans-serif"> sans-serif &mdash;
abcdefghijklmnopqrstuvwxyz </span><br/>
<span style="font-family:serif"> serif &mdash;
abcdefghijklmnopqrstuvwxyz </span><br/>
<span style="font-family:monospace"> monospace &mdash;
abcdefghijklmnopqrstuvwxyz </span><br/>
<span style="font-family:cursive"> cursive &mdash;
abcdefghijklmnopqrstuvwxyz </span><br/>
<span style="font-family:fantasy"> fantasy &mdash;
abcdefghijklmnopqrstuvwxyz </span>
</p>
 
Search WWH ::




Custom Search