CSS font-family Property Example

Updated on     Kisan Patel

The CSS font-family property define different types of fonts such as Arial, Times New Roman, Script, monospace and so on for an HTML element.

Syntax

font-family: font;

The font-family property specifies a list of fonts, from highest priority to lowest. If the browser does not support the first font, it tries the next font.

Example

h1
{
 font-family: Arial, verdana, serif;
}
h2
{
 font-family: script;
}
h3
{
 font-family: 'Times New Roman';
}
h4
{
 font-family: fantasy;
}
h5
{
 font-family: Garamond;
}


CSS

Leave a Reply