font

英[fɒnt] 美[fɑ:nt]

n. Font; font; baptistery (located in a church, often made of stone ); (same font and size) a pair of typefaces

Plural: fonts

family

英[ˈfæməli] 美[ˈfæmli]

n. Family; clan; child; ancestor

adj. family; owned by the family; belonging to the family; suitable for the whole family

Plural: families

css font-family property syntax

Function: Specifies the font series of the element.

Description: font-family can save multiple font names as a "fallback" system. If the browser doesn't support the first font, it will try the next one. That is, the value of the font-family attribute is a precedence list of font family names or/and class family names to use for an element. The browser will use the first value it recognizes.

Notes: Separate each value with a comma, and always provide a family name as a last resort. The use of a particular font family (Geneva) depends entirely on the availability of that font family on the user's machine; this attribute does not indicate any font download. Therefore, it is highly recommended to use a common font family name as a fallback.


css font-family property example

<html>
<head>
<style type="text/css">
p.serif{font-family:"Times New Roman",Georgia,Serif}
p.sansserif{font-family:Arial,Verdana,Sans-serif}
</style>
</head>

<body>
<h1>CSS font-family</h1>
<p class="serif">php中文网视频教程</p>
<p class="sansserif">php中文网程序员词典</p>

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance