CSS - font-family


Advertisements


Description

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";

Example

Here is the example using this property −

Live Demo
<html>
   <head>
   </head>

   <body>
      <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.
      </p>
   </body>
</html>

This will produce following result −



Advertisements