font-family | WebReference


Name: font-family

Description: Specifies the name of the font family used to display the element's text.

Browser Compatibility: IE 3+ / NN 4+ / O 3.2

Inherited: Yes


Code Example:

p.extra {font-family: Courier, "Courier New", serif;}

Comments: Since the display of fonts depends on the actual font being on the user's machine, it's advisable to also specify a generic font family at the end. Family names containing whitespace must be enclosed in quotes (e.g., "Times New Roman"). It's not necessary to enclose generic font families in quotes.