

Because typographic traditions vary widely across the world, this generic is provided for typefaces that don't map cleanly into the other generics. system-ui Glyphs are taken from the default user interface font on a given platform. Papyrus, Herculanum, Party LET, Curlz MT, Harrington, fantasy. fantasy Fantasy fonts are primarily decorative fonts that contain playful representations of characters.Į.g. "Brush Script MT", "Brush Script Std", "Lucida Calligraphy", "Lucida Handwriting", "Apple Chancery", cursive. The glyphs are partially or completely connected, and the result looks more like handwritten pen or brush writing than printed letterwork.Į.g. cursive Glyphs in cursive fonts generally have either joining strokes or other cursive characteristics beyond those of italic typefaces. "Fira Mono", "DejaVu Sans Mono", Menlo, Consolas, "Liberation Mono", Monaco, "Lucida Console", monospace. monospace All glyphs have the same fixed width.Į.g. "Open Sans", "Fira Sans", "Lucida Sans", "Lucida Sans Unicode", "Trebuchet MS", "Liberation Sans", "Nimbus Sans L", sans-serif. sans-serif Glyphs have stroke endings that are plain.Į.g. Lucida Bright, Lucida Fax, Palatino, "Palatino Linotype", Palladio, "URW Palladio", serif. The following keywords are defined: serif Glyphs have finishing strokes, flared or tapering ends, or have actual serifed endings.Į.g. A generic font family should be the last item in the list of font family names. Generic family names are keywords and must not be quoted. Generic font families are a fallback mechanism, a means of preserving some of the style sheet author's intent when none of the specified fonts are available. Font family names containing whitespace should be quoted. For example, "Times" and "Helvetica" are font families. The example below lists two font families, the first with a and the second with a : font-family: Gill Sans Extrabold, sans-serif Values The name of a font family. Each font family is specified as either a or a value.

The font-family property lists one or more font families, separated by commas. The unique non-ambiguous order defined by the formal grammar

It also applies to ::first-letter and ::first-line. When a font is only available in some styles, variants, or sizes, those properties may also influence which font family is chosen. However, this doesn't work in Internet Explorer 6 or earlier. Rather, font selection is done one character at a time, so that if an available font does not have a glyph that can display a character needed, the later available fonts are tried. Font selection does not simply stop at the first font named in the list that is on the user's system. Note: The font-family property specifies a list of fonts, from highest priority to lowest. It is often convenient to use the shorthand property font to set font-size and other font related properties all at once. The generic family lets the browser select an acceptable fallback font when needed. Web authors should always add at least one generic family in a font-family list, since there's no guarantee that a specific font is installed on the computer or can be downloaded using a at-rule. The browser will select the first font on the list that is installed on the computer or that can be downloaded using a at-rule. Values are separated by a comma to indicate that they are alternatives. * A font family name and a generic family name */įont-family: Gill Sans Extrabold, sans-serif įont-family: "Goudy Bookletter 1911", sans-serif The font-family CSS property lets you specify a prioritized list of font family names and/or generic family names for the selected element.
