From W3C Wiki
Jump to: navigation, search


The font-family property value is a prioritized list of font family names and/or generic family names.


Values [[ <family-name> | <generic-family> ] [, <family-name>| <generic-family>]* ] | inherit
Initial value Depends on user agent
Applies to All elements
Inherited Yes


  • <family-name>
    The name of a font family of choice.

  • <generic-family>
    The following generic families are defined:
    • serif
    • sans-serif
    • cursive
    • fantasy
    • monospace

  • inherit
    Takes the same specified value as the property for the element's parent.


Example A


#se {
  font-family: serif;
#sa {
  font-family: Gill, Helvetica, sans-serif;


  <p id="se">This is a paragraph(serif)</p>
  <p id="sa">This is a paragraph(sans-serif)</p></body>

Csslist2 font-family.png

CSS Reference

The CSS specification defines the font-family property in 15.3 Font family.