CSS Home
CSS Reference
Pseudo Classes & Elements
© 2011 TutorialsPoint.COM
|
CSS - font-family
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:
<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>
|
This will produce following result:
This text is rendered in either georgia, garamond, or the default
serif font depending on which font you have at your system.
|
To Become more comfortable - Do Online Practice
|
|
|