CSS font-family property
The font-family
property specifies the selected element's typeface. Since there are no typefaces that are universally supported across all browsers and platforms, the best practice is to indicate several typefaces, font families, and generic family names that would definitely work with your design.
Start with your preferred typeface — for example, "Open Sans"
. If the typeface is more than one word, you must use quotation marks. Then enter your second, third, etc., choices, separated by commas. The browser will choose the first available font. At the end, include at least one generic family name[1] — serif
, sans-serif
, monospace
, cursive
, or fantasy
— in case none of your preferred fonts are available.