Difference between revisions of "CSS GUIDE FONT FAMILY"
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
== Summary == | == Summary == | ||
− | font-family allows for a prioritized list of font family names and/or generic family names to be specified for the selected element. Unlike most other CSS properties, values are separated by a comma to indicate that they are alternatives. | + | '''font-family''' allows for a prioritized list of font family names and/or generic family names to be specified for the selected element. Unlike most other CSS properties, values are separated by a comma to indicate that they are alternatives. |
* Initial value: depends on user agent | * Initial value: depends on user agent | ||
Line 22: | Line 20: | ||
'''family-name''' | '''family-name''' | ||
− | The name of a font family. For example, "Times" and "Helvetica" are font families. Font family names containing whitespace should be quoted. | + | * The name of a font family. For example, "Times" and "Helvetica" are font families. Font family names containing whitespace should be quoted. |
'''generic-family''' | '''generic-family''' | ||
− | The following generic families are defined: serif, sans-serif, cursive, fantasy, monospace. Generic family names are keywords and should not be quoted. | + | * The following generic families are defined: serif, sans-serif, cursive, fantasy, monospace. Generic family names are keywords and should not be quoted. |
== Mozilla Recommended Values == | == Mozilla Recommended Values == | ||
Line 43: | Line 41: | ||
* [http://www.w3.org/TR/CSS1#font-family CSS 1] | * [http://www.w3.org/TR/CSS1#font-family CSS 1] | ||
+ | * [http://www.w3.org/TR/REC-CSS2/fonts.html#font-family-prop CSS 2] | ||
* [http://www.w3.org/TR/CSS21/fonts.html#font-family-prop CSS 2.1] | * [http://www.w3.org/TR/CSS21/fonts.html#font-family-prop CSS 2.1] | ||
* [http://www.w3.org/TR/2002/WD-css3-fonts-20020802/#font-family-prop CSS 3] | * [http://www.w3.org/TR/2002/WD-css3-fonts-20020802/#font-family-prop CSS 3] | ||
Line 49: | Line 48: | ||
== See Also == | == See Also == | ||
− | |||
− | |||
− |
Latest revision as of 15:40, 13 December 2006
Contents
Summary
font-family allows for a prioritized list of font family names and/or generic family names to be specified for the selected element. Unlike most other CSS properties, values are separated by a comma to indicate that they are alternatives.
- Initial value: depends on user agent
- Applies to: all elements
- Inherited: yes
- Percentages: N/A
- Media: visual
- Computed value: as specified
Syntax
font-family: [[family-name|generic-family] [,family-name|generic-family]*] | inherit
Legal Values
family-name
- The name of a font family. For example, "Times" and "Helvetica" are font families. Font family names containing whitespace should be quoted.
generic-family
- The following generic families are defined: serif, sans-serif, cursive, fantasy, monospace. Generic family names are keywords and should not be quoted.
Mozilla Recommended Values
Usage Examples
body { font-family: "Gill Sans Extrabold", Helvetica, sans-serif } .receipt { font-family: Courier, "Lucida Console", monospace }