CSS - font-family


The font-family property allows the author to provide a comma-separated list of specific font families, plus a generic type of font family, to be used in the rendering of an element's text.

Possible Values

  • font-family − Comma-separated list of font families.

Applies to

All the HTML elements.

DOM Syntax

object.style.fontFamily = "georgia,garamond,serif";


Here is the example using this property −


      <p style = "font-family:georgia,garamond,serif;">
         This text is rendered in either georgia, garamond, or the 
         default serif font depending on which font  you have at your system.

This will produce following result −