ArticleslgStudy

science

Font family (HTML)

Font family (HTML) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Font family (HTML) rather than just read about it. In short: 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. The family selection is available in two forms: in the deprecated (X)HTML <font>...</font> element with its face attribute, and in the CSS font-family property.

Key takeaways

  • Font family (HTML) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Font family (HTML) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Font family (HTML) from memory before moving on to harder problems.

Reference excerpt

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. The family selection is available in two forms: in the deprecated (X)HTML <font>...</font> element with its face attribute, and in the CSS font-family property. The CSS term font family is matched with the typographical term typeface, which is a grouping of fonts defined by shared design styles. 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 face is matched with "font"; it is decided by a combination of the font family and the additional properties. In both HTML and CSS, the list is separated by commas. 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 the absence of a font being found, the web browser will use its default font, which may be a user-defined one. Depending on the web browser, a user can in fact override the font defined by the code writer. 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. In addition to local fonts, modern web browsers support linking custom font files directly by using the @font-face declaration. Once included, such fonts can be listed in the font-family property, alongside all local and fallback fonts.

Examples The following example defines the same font face (Times or a default serif, 14 points, italics) in three ways:

With CSS in a separate stylesheet. With inline CSS applied to an element via the style attribute. With the deprecated presentational element <font>...</font> and its non-standard attribute face. (<i>...</i> is not deprecated in general, but its presentational use is.)

It is a best practice to put a space after the comma, and to put any name containing spaces between quotation marks.

Font name as family name Although 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 particular font face. 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). As 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. Neither CSS2 nor CSS3 endorse such a use (they are not found in examples), but most browsers accept them as valid "names" nevertheless.

Generic fonts

The font-family can use a specific named font (like Heisei Mincho W9), but the result depends on the fonts installed on the user machine. The actual appearance will depend on the browser and the fonts installed on the system. A default installation of Firefox on Microsoft Windows, for instance, will display both serif as Times New Roman, and both sans-serif as Arial. Usually only a small subset of them, chiefly the Serif, Sans-serif, Monospace and Cursive are easily configurable by user in web browsers. Many systems also perform special-cased font substitution to replace missing "well-known" families with metric-compatible alternatives. For example, Windows substitutes Helvetica with Arial, and Times with Times New Roman. These families are not generic in the CSS sense, and are generally not handled at the browser level.

See also Core fonts for the Web List of typefaces Presentational markup Web typography

Notes

Worked examples

Example 1 — a first encounter with Font family (HTML)

Start with the simplest possible case. Write down what Font family (HTML) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Font family (HTML) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Font family (HTML) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Font family (HTML)

In research
Font family (HTML) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Font family (HTML) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Font family (HTML) is common in secondary-school and first-year university syllabi. It links to neighbouring topics HTML, Typesetting, so understanding it makes those chapters shorter.
In everyday life
Look for Font family (HTML) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Font family (HTML)” →

How to study Font family (HTML) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Font family (HTML) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Font family (HTML) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Font family (HTML) in simple terms?

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. The family selection is available in two forms: in…

Why does Font family (HTML) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Font family (HTML)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Font family (HTML).

Tags

  • HTML
  • Typesetting

Keep exploring