font family


font-family: ***;

Browser
Internet Explorer Firefox Opera

The font-family property specifies the font name of the text.


p {
font-family: "Times New Roman";
}


Property Value Explanation
font-family font name the list of the fonts

The font is specified by the font family names or generic family names.

The list of the fonts

If you set two or more fonts, separate by a comma.

font-family: "Font1","Font2","Font3";

When Font1 cannot be used in the user's computer, Font2 is used.

The generic family names

Generic names are the following five names.

sans-serif, serif, cursive, fantasy, monospace

Use of quotation marks

If a font name contains space, it must be placed within quotation marks.

font-family: "Century Gothic";
font-family: Century;


Example

<html>
<head>
<title>TAG index</title>

<style type="text/css">

p {
font-size: 200%;
font-weight: bold;
font-family: "Times New Roman",Century,serif;
}

</style>

</head>
<body>

<p>Times New Roman</p>

</body>
</html>
Output

Times New Roman