Please visit our sponsors !
The font-family property
The font-family property is a prioritized list of font family names and/or generic family names for an
element.
The browser will use the first value it recognizes.
There are two types of font-family values:
- family-name: The name of a font-family, like "times",
"courier", "arial", etc.
- generic-family: The name of a generic-family, like "serif",
"sans-serif", "cursive", "fantasy", "monospace".
Note: Separate each value with a comma, and always offer a
generic-family name as the last alternative.
Note: If a family-name contains white-space, it should be quoted. Single quotes must be used
when using
the "style" attribute in HTML.
Inherited: Yes
Example
body
{
font-family: courier, serif
}
p
{
font-family: arial, "lucida console", sans-serif
}
<p style="font-family: arial, 'lucida console', sans-serif">
|
Possible Values
Value |
Description |
NN |
IE |
family-name
generic-family |
A prioritized list of font family names and/or generic family
names for an element |
4.0 |
3.0 |
Browser Notes
Notes in Netscape 4.0+:
- The "cursive" generic-family renders as "serif"
- The "fantasy" generic-family renders as "sans-serif"
|
Jump to: Top of Page
or HOME or
Printer friendly page
Search W3Schools:
What Others Say About Us
Does the world know about us? Check out these places:
Dogpile
Alta Vista
MSN
Google
Excite
Lycos
Yahoo
Ask Jeeves
We Help You For Free. You Can Help Us!
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 1999-2002 by Refsnes Data. All Rights Reserved
|