And it matters in email.īut accessibility matters, too. Because, as big brands know, typography matters. Ok, maybe not hours, but most people spend a bit of time on it. When you first start writing reports, you spend hours trying to figure out the best font to use.
Neither CSS2 nor CSS3 endorse such a use (they are not found in examples), but most browsers accept them as valid "names" nevertheless.
This usage is due to font files not describing themselves as part of a family, partially motivated by the fact that few editors at the time supported the selection among more than four font styles (bold/regular and italics/regular).Īs a result, it used to be common to see declarations such as font-family: 'Gill Sans Extrabold', 'Heisei Mincho W9' in place of the pedantically correct font-family: 'Gill Sans', 'Heisei Mincho' font-weight: 900. It is a best practice to put a space after the comma, and to put any name containing spaces between quotation marks.Īlthough CSS tries to define a font family as the same as a typeface, the font-family entry and its non-standard HTML predecessor has also historically been used to identify the entire font face. Sample text formatted with the deprecated FONT tag. Sample text formatted with CSS in a separate stylesheet. Once included, such fonts can be listed in the font-family property, alongside all local and fallback fonts. In addition to local fonts, modern web browsers support linking custom font files directly by using the declaration. This may be for personal taste reasons, but may also be because of some physical limitation of the user, such as the need for a larger font size or the avoidance of certain colors.
Depending on the web browser, a user can in fact override the font defined by the code writer. In the absence of a font being found, the web browser will use its default font, which may be a user-defined one. To avoid unexpected results, the last font family on the font list should be one of the generic families which are by default always available. In both HTML and CSS, the list is separated by commas. The CSS term font face is matched with "font" it is decided by a combination of the font family and the additional properties. A font is a particular set of glyphs (character shapes), differentiated from other fonts in the same family by additional properties such as stroke weight, slant, relative width, etc. The CSS term font family is matched with the typographical term typeface, which is a grouping of fonts defined by shared design styles. element with its face attribute, and in the CSS font-family property. The family selection is available in two forms: in the deprecated (X)HTML. The font family selection in (X)HTML, CSS, and derived systems specifies a list of prioritized fonts and generic family names in conjunction with correlating font properties, this list determines the particular font face used to render characters.