Syntax | selector {font-family: family, family;}
(OR)
selector {font-family: value;}
|
---|---|
Usage | The font-family property is used to specify a comma separated list of font families. The font family list is prioritized with the highest priority occurring first. If the first font family is not available then the second one, if available, will be used. If the second one is not available then the third one, if available, will be used, and so on. The keywords represent generic font families. It is common to list 2 or 3 family names followed by a keyword. By placing the keyword last, it will only be used if the other family names are not available. See the following example where the keyword serif is listed last. p {font-family: Georgia, "Times New Roman", Times, serif;} The "Times New Roman" family name, shown above, is enclosed within quotation marks. If quotation marks are not used then some characters (e.g., punctuation and digits) may need escaping. Therefore it is suggested that family names containing white spaces, punctuation marks, or digits, be enclosed within quotation marks to avoid escaping mistakes. Keyword names, however, must NOT be enclosed in quotation marks. |
Keywords |
|
Applies To | All elements |
Inherited | Yes |
Initial Value | Browser dependent |
The font-family properties are set using 2 different family types. |