1
edit
Changes
no edit summary
<span style="margin:0;background:#ffff33;font-size:120%;font-weight:bold;border:1px solid #a3b0bf;text-align:left;color:#000;padding:0.2em 0.4em;">This document is a work in progress and is subject to change.</span><br /><br />
== 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 ==
<pre>
font-family: [[family-name|generic-family]
[,family-name|generic-family]*] | inherit
</pre>
== 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 ==
<pre>
body { font-family: "Gill Sans Extrabold", Helvetica, sans-serif }
.receipt { font-family: Courier, "Lucida Console", monospace }
</pre>
== Notes ==
== Specification Conformance ==
* [http://www.w3.org/TR/CSS1#font-family CSS 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]
== Browser Compatibility ==
== See Also ==
* [http://www.w3.org/TR/REC-CSS2/fonts.html#font-family-prop W3 CSS 2]
* [http://www.w3.org/TR/CSS21/fonts.html#font-family-prop W3 CSS 2.1]
== 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 ==
<pre>
font-family: [[family-name|generic-family]
[,family-name|generic-family]*] | inherit
</pre>
== 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 ==
<pre>
body { font-family: "Gill Sans Extrabold", Helvetica, sans-serif }
.receipt { font-family: Courier, "Lucida Console", monospace }
</pre>
== Notes ==
== Specification Conformance ==
* [http://www.w3.org/TR/CSS1#font-family CSS 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]
== Browser Compatibility ==
== See Also ==
* [http://www.w3.org/TR/REC-CSS2/fonts.html#font-family-prop W3 CSS 2]
* [http://www.w3.org/TR/CSS21/fonts.html#font-family-prop W3 CSS 2.1]