The CSS propertyfont-family allows specify a list of prioritized fonts, either by a specific font name (such as Arial) or a generic font name (such as sans-serif).
The list of font names is separated by commas. The names of the fonts are case insensitiv. If a font name has a space, the font name needs not be enclosed in apostrophes, although it does not harm.
* {
font-family: Franklin Gothic, Garamond, times
}
The generic CSS font families
The five original generic CSS font families are
serif
sans-serif
cursive
fantasy
monospace
Added were:
system-ui
ui-serif
ui-sans-serif
ui-monospace
ui-rounded
math
fangsong
The following simple example renders the five original font families: