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.
What students will learn in this module
Every question in Module 43
Quick questions
- Which property sets the typeface of text?Afont-typeBfont-family
- Is font-weight: 700; the same as font-weight: bold;?AYes — 700 equals boldBNo — they are different
- Which value makes text slant to the right using font-style?AitalicBbold
- Must you always include a fallback generic font in font-family?ANo — one font name is enoughBBest practice — yes
- 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 doesfont-weight: bold;Match it to what it doesfont-style controls slant (italic or normal)Match it to what it doesThe font shorthand sets size and family at minimumMatch it to what it doesfont-size: 24;Match it to what it doesfont-family: Times New Roman, serif;Match it to what it doesFill in the blanks
p { ___________: Arial, sans-serif; }Hint: Type the CSS property that sets the typeface
h1 { _________: 32px; }Hint: Type the CSS property that sets how large the text appears
p { font-weight: ____; }Hint: Type the keyword that makes text bold
em { font-style: ______; }Hint: Type the value that makes text slant to the right
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}
