Home » CSS Tutorial » CSS Properties » font-family
font-family
CSS Property Info :
| Syntax: |
font-family: [[<family-name> | <generic-family>],]* [<family-name> | <generic-family>]
|
| Possible Values: |
<family-name>
- Any font family name may be used
<generic-family>
- serif (e.g., Times)
- sans-serif (e.g., Arial or Helvetica)
- cursive (e.g., Zapf-Chancery)
- fantasy (e.g., Western)
- monospace (e.g., Courier)
|
| Initial Value: |
Determined by browser |
| Applies to: |
All elements |
| Inherited: |
Yes |
CSS Browser Support :
Internet Explorer 3+
Netscape 4+
Opera 3.6+
W3C's CSS Level 1+
CSS Profile 1.0
Web TV
CSS Property Description :
Font families may be assigned by a specific font name or a generic font family. Obviously, defining a specific font will not be as likely to match as a generic font family. Multiple family assignments can be made, and if a specific font assignment is made it should be followed by a generic family name in case the first choice is not present.
A sample font-family declaration might look like this:
P { font-family: "New Century Schoolbook", Times, serif }
Notice that the first two assignments are specific type faces: New Century Schoolbook and Times. However, since both of them are serif fonts, the generic font family is listed as a backup in case the system does not have either of these but has another serif font which meets the qualifications.
Any font name containing whitespace must be quoted, with either single or double quotes.
The font family may also be given with the font property.
CSS Bugs / Problems :
none
Adapted by style-sheets.com, maker of Style Studio, powerful CSS Editor for Windows.
Copyright © John Pozadzides and Liam Quinn. All rights reserved.
Home » CSS Tutorial » CSS Properties » font-family
|