PROPERTY: font-family

font-family : family-name &| generic-family
 
Compatibility:  IE4+  N4+
Version: Level 1
Inherited: Yes
 
The font-family property allows you to select specific typefaces or a generic family of typefaces.
 
You can list a prioritized selection of family-name and/or generic-name typefaces. The program will consider each typeface value in turn and will use the first value it finds that is recognized by the browser. In the list, each typeface value must be separated by a comma. This is one of the few places where commas are used in declaring values for a property. The use of a pair of double quotes to enclose the typeface name is optional. However, it is recommended that any typeface name, such as "helvetica extra bold", that contains blank (white) spaces, should be enclosed by double quotes. Note that single quotes must be used in place of double quotes when using certain HTML code.
 
family-name
 
The family-name typeface values are the font names, such as: Courier, Arial, Times, Roman, etc. It is not possible to present a definitive list since not all computers have all typefaces installed.
 
generic-family
 
There are five values of generic-name typefaces to choose from:
cursive
fantasy
monospace
serif
sans-serif
 
It is recommended that generic-name typeface values be used as a last resort.
 
Code:
p { font-family: Courier, "Zapf Dingbat", serif}
 
or
 
<span style="font-family: arial;">Arial </span>
<span style="font-family: courier;">Courier </span>
<span style="font-family: helvrtica;">Helvetica </span>
<span style="font-family: palatino;">Palatino </span>
<span style="font-family: symbol;">Symbol </span>
<span style="font-family: times;">Times </span>

 
output:
Arial Courier Helvetica Palatino Symbol Times


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information