
The Complete Idiot's Style Sheets Reference
| Index
| Current Category: Fonts |
| Previous Style: font
| Next Style: font-size
|
font-family
Formats text with a specified font family (typeface).
Support:
-
Notes:
Possible Values:
- [family-name]
One or more font family names.
-
Support:
-
W3C Standard | Internet Explorer | Netscape Navigator |
CSS1 and later |
3.0 and later |
4.0 and later |
-
Notes:
-
If you're specifying multiple font families, separate each one with a comma.
- Enter the font families in the order that you prefer.
- A specified font family will only be displayed if the user has that font installed on their computer.
- If a font family name contains spaces, surround the name with quotation marks.
- [generic-family]
One or more keywords that specify generic font families.
-
Support:
-
W3C Standard | Internet Explorer | Netscape Navigator |
CSS1 and later |
3.0 and later |
4.0 and later |
-
Notes:
-
Possible values: cursive, fantasy, monospace, serif, sans-serif.
- The W3C has good descriptions and examples of the generic font families.
Example:
<STYLE TYPE="text/css">
<!--
H1 {font-size: 14pt; font-family: "Times New Roman"}
H2 {font-size: 14pt; font-family: Arial}
H3 {font-size: 14pt; font-family: "Comic Sans MS"}
H4 {font-size: 14pt; font-family: Impact}
H5 {font-size: 14pt; font-family: "Courier New"}
-->
</STYLE>
<H1>Times New Roman</H1>
<H2>Arial</H2>
<H3>Comic Sans MS</H3>
<H4>Impact</H4>
<H5>Courier New</H5>
You should always provide
<SPAN STYLE="font-family: Arial, Verdana, Helvetica, 'MS Sans Serif', sans-serif">
a selection of font families</SPAN>.
How It Looks:
-
Times New Roman
Arial
Comic Sans MS
Impact
Courier New
You should always provide
a selection of font families.
| Index
| Current Category: Fonts |
| Previous Style: font
| Next Style: font-size
|
|