Font properties, online

Six activities your students do on their own devices. See who's finished, and their scores.

Font properties in one minute

What students need to know

font-style: italic renders text in an italicised/slanted form. The font shorthand combines style, weight, size, and family into one declaration.

font-family accepts a list of typeface names. font-type does not exist in CSS. The numeric value 700 maps exactly to the bold keyword in CSS font weight.

Mistakes students make

  • Font names containing spaces must be quoted. It should be font-family: "Comic Sans", serif;.
  • font-size needs a unit. It should be font-size: 24px; (or another valid unit like em or rem).
  • font-stile is a misspelling. The correct property name is font-style: italic;.
  • normal is not a valid value for font-size. It should be a length like 16px or a keyword like medium.
PREVIOUS · MODULE 42Text styling
YOU ARE HERE · MODULE 43Font properties
NEXT · MODULE 44CSS units

Discover other journeys with this module

What students will learn in this module

Every question in Module 43

Quick questions

  1. Which property sets the typeface of text?Afont-typeBfont-family
  2. Is font-weight: 700; the same as font-weight: bold;?AYes — 700 equals boldBNo — they are different
  3. Which value makes text slant to the right using font-style?AitalicBbold
  4. Must you always include a fallback generic font in font-family?ANo — one font name is enoughBBest practice — yes
  5. Does font-size: 24; (without a unit) work in CSS?ANo — a unit is requiredBYes — px is assumed

Key terms

Students type the meaning of:

  • font-family

Match the pairs

font-family: Arial, sans-serif;Match it to what it does
font-weight: bold;Match it to what it does
font-style controls slant (italic or normal)Match it to what it does
The font shorthand sets size and family at minimumMatch it to what it does
font-size: 24;Match it to what it does
font-family: Times New Roman, serif;Match it to what it does

Fill in the blanks

  1. p { ___________: Arial, sans-serif; }

    Hint: Type the CSS property that sets the typeface

  2. h1 { _________: 32px; }

    Hint: Type the CSS property that sets how large the text appears

  3. p { font-weight: ____; }

    Hint: Type the keyword that makes text bold

  4. em { font-style: ______; }

    Hint: Type the value that makes text slant to the right

  5. p { ____ : bold 16px Arial; }

    Hint: Type the shorthand property that sets weight, size, and family together

Spot the error

Question 1

Afont-family: Comic Sans, serif;Bfont-size: 18px;Cfont-weight: bold;

Question 2

Ah2 {B  font-size: 24;C  font-weight: bold;D}

Question 3

Ap {B  font-family: Arial, sans-serif;C  font-stile: italic;D}

Question 4

Ap {B  font-family: Arial;C  font-weight: 700;D  font-size: normal;E}

Question 5

Ah1 {B  font-size: 2em;C  font-style: italic;D  font-family: Georgia serif;E}