Web fonts can be are pre-installed on operating systems (these are called "safe fonts") or import from web server (these are called "web fonts").

If, for some reason, the first specified font-family cannot be loaded, it is necessary to specify, as a backup, another similar font-family or generic family name.

Generic family names are keywords for templates from which font families of similar appearance and characteristics are generated.

Also, generic family names are very important for formatting the appearance of text on mobile phones because many standard fonts do not work on them.

EXAMPLE:
font-family: Arial, "Arial Black", sans-serif;

In this example, Arial is the first default font name, "Arial Black" is a similar fallback font if the first font fails to load, and SANS-SERIF is the name of the generic family name. A generic font family should be the last item in the list of font-family names and is not placed under quotation marks.
If a font's name is more than one word, it must be in quotation marks.
There are several generic CSS family names, the most dominant of which are:
– serif
– sans-serif
– cursive
– fantasy
– monospace

CSS generic font-family

font-family: serif;

Serif fonts have small decorative strokes at the ends of letters. They are traditional and often used in printed text.


font-family: "Times New Roman", serif; Example CSS font name "Times New Roman" from SERIF generic family


font-family: Georgia, serif; Example CSS font name Georgia from SERIF generic family


font-family: "Book Antiqua", serif; Example CSS font name "Book Antiqua" from SERIF generic family


font-family: "Palatino Linotype", serif; Example CSS font name "Palatino Linotype" from SERIF generic family


font-family: "MS Serif", serif; Example CSS font name "MS Serif" from SERIF generic family


font-family: Cambria, serif; Example CSS font name Cambria from SERIF generic family


font-family: "Garamond", serif; Example CSS font name "Garamond" from SERIF generic family

font-family: sans-serif;

Sans-serif fonts do not have decorative strokes at the ends of letters (“sans” means “without” in French). They are clean, modern, and best suited for web readability.


font-family: Arial, sans-serif; Example CSS font name Arial from SANS-SERIF generic family


font-family: "Microsoft Sans Serif", sans-serif; Example CSS font name "Microsoft Sans Serif" from SANS-SERIF generic family


font-family: "Arial Black", sans-serif; Example CSS font name "Arial Black" from SANS-SERIF generic family


font-family: "Lucida Sans", sans-serif; Example CSS font name "Lucida Sans" from SANS-SERIF generic family


font-family: Verdana, sans-serif; Example CSS font name Verdana from SANS-SERIF generic family


font-family: Helvetica, sans-serif; Example CSS font name Helvetica from SANS-SERIF generic family


font-family: "Trebuchet MS", sans-serif; Example CSS font name "Trebuchet MS" from SANS-SERIF generic family


font-family: Tahoma, sans-serif; Example CSS font name Tahoma from SANS-SERIF generic family


font-family: "Segoe UI", sans-serif; Example CSS font name "Segoe UI" from SANS-SERIF generic family


font-family: "Gill Sans", sans-serif; Example CSS font name "Gill Sans" from SANS-SERIF generic family


font-family: "Noto Sans", sans-serif; Example CSS font name "Noto Sans" from SANS-SERIF generic family

font-family: cursive;

Cursive fonts imitate handwriting. Letters are often connected, resembling pen or brush writing. These fonts are decorative and add a personal, creative look.


font-family: "Comic Sans MS", cursive;       Example CSS font name "Comic Sans MS" from CURSIVE generic family


font-family: "Lucida Handwriting", cursive;       Example CSS font name "Lucida Handwriting" from CURSIVE generic family


font-family: "Brush Script MT", cursive;       Example CSS font name "Brush Script MT" from CURSIVE generic family


font-family: "Segoe Print", cursive;       Example CSS font name "Segoe Print" from CURSIVE generic family


font-family: "Ink Free", cursive;       Example CSS font name "Ink Free" from CURSIVE generic family


font-family: Magneto, cursive;       Example CSS font name Magneto from CURSIVE generic family


font-family: "MV Boli", cursive;       Example CSS font name "MV Boli" from CURSIVE generic family

font-family: fanatsy;

Fantasy fonts are decorative and unusual. They are best used for headings or short, impactful text where style is more important than readability.


font-family: Copperplate, fantasy;       Example CSS font name Copperplate from FANTASY generic family


font-family: Papyrus, fantasy;       Example CSS font name Papyrus from FANTASY generic family


font-family: Impact, fantasy;       Example CSS font name Impact from FANTASY generic family


font-family: Luminari, fantasy;       Example CSS font name Luminari from FANTASY generic family


font-family: monospace;

In monospace fonts, all characters have the same fixed width. They are commonly used for displaying code or terminal-style text.


font-family: Courier, monospace;       Example CSS font name Courier from MONOSPACE generic family


font-family: Courier, monospace; Example CSS font name Courier from MONOSPACE generic family


font-family: "Courier New", monospace; Example CSS font name "Courier New" from MONOSPACE generic family


font-family: Consolas, monospace; Example CSS font name Consolas from MONOSPACE generic family


font-family: Menlo, monospace; Example CSS font name Menlo from MONOSPACE generic family


font-family: Monaco, monospace; Example CSS font name Monaco from MONOSPACE generic family


font-family: "Lucida Console", monospace; Example CSS font name "Lucida Console" from MONOSPACE generic family


font-family: "Andale Mono", monospace; Example CSS font name "Andale Mono" from MONOSPACE generic family


More examples CSS generic family names

font-family: emoji, sans-serif;;       Example "emoji" to display emoji symbols: ⚽ 🎁 🌈 🌼

font-family: math;       Example "math" to display math symbols: $E=mc^2$ and $\Sigma \int \frac{\partial f}{\partial x} dx$

font-family: fangsong;       example "fangsong" Chinese FangSong writing style, equivalent to Serif    宋体, 明朝体

font-family: system-ui;       Example "system-ui", this is the system UI font. It is fast and refreshes the website.

font-family: ui-rounded;       Example "ui-rounded", this is a system UI font with rounded features (rounded).

font-family: ui-serif;       Example "ui-serif", this is the system UI font with serifs (serif).

font-family: ui-sans-serif;       Example "ui-sans-serif", this is the system UI sans-serif font.

font-family: ui-monospace;       Example "ui-monospace", this is a system UI font with fixed width (monospace) for CODE.









Privacy Policy