CSS font-family Property

❮ Previous Reference Next ❯


p {
  font-family: "Times New Roman", Times, serif;

Hello World!

Lorem Ipsum is simply dummy text of the printing and typesetting industry.


The font-family property sets the font face to be used for text.

Default value:depends on the browser
JavaScript syntax:

Standard Syntax

font-family: family-name|generic-family|initial|inherit|revert|revert-layer|unset;

Browser Support

The numbers in the table specify the first browser version that fully supports the property.


Property Values

The following table describes the values of this property.

Value Description
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 Generic font families can be used as a general fallback mechanism when the desired font choices are not available. As generic family names are keywords, they must not be quoted.
A generic font family should be the last alternative in the list of font family names. The following generic families are defined:
  • cursive (e.g. Zapf-Chancery)
  • fantasy (e.g. Western)
  • monospace (e.g. Courier)
  • sans-serif (e.g. Arial)
  • serif (e.g. Times)
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element animation-delay property.
revert Reverts the cascaded value of the property from its current value to the value the property
revert-layer Rollback styles to the ones specified in previous cascade layers.
unset Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.

Default CSS Property Values

selectors {
  font-family: depends on the browser;
❮ Previous Reference Next ❯