What is font-family?

A font-family property specifies the font within a CSS element. It lists the prioritized font family names for the element from highest priority to lowest.

More About font-family

In a font-family property, fonts are listed and separated by commas. They are specified as family-name or generic-name.

The family-name value indicates the font family, such as “Helvetica.”

By contrast, the generic-name value is a fallback font family when no other specified fonts can be used. It should be a keyword without quotations, such as ‘serif’ or ‘cursive’. It will specify the font’s finishing stroke, with serif having tapering ends and cursive having joining strokes.

When specifying font family names in CSS, they should be quoted as strings or unquoted with identifiers. Quoted font family names should contain white space, digits, or punctuation instead of hyphens.

Special Offer
Custom Website Design
Get a one-of-a-kind, mobile-friendly website that makes your brand truly shine. Share your vision with us and we'll take it from there.