font-family: ***;
Browser |
|
---|
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;