Text styling, online
Six activities your students do on their own devices. See who's finished, and their scores.
Text styling in one minute
What students need to know
line-height sets how tall each line is, so it changes the gap between lines. text-decoration controls lines drawn on text. The value none removes them.
text-transform changes how the text looks only. The words in the HTML stay as they were typed. color changes the text. background-color changes the area behind the text.
Mistakes students make
- middle is not a text-align value. It should be text-align: center; to put the text in the middle.
- no is not a valid value. It should be text-decoration: none; to remove the underline.
- The text-transform declaration has no semicolon. It should be text-transform: uppercase; before the next declaration.
- The property name has a space instead of a hyphen. It should be line-height: 1.6; written as one hyphenated word.
What students will learn in this module
Every question in Module 42
Quick questions
- Which declaration centres text inside its container?Atext-align: center;Balign-text: middle;
- Which declaration removes the underline from a link?Atext-underline: off;Btext-decoration: none;
- What does text-transform: uppercase do?ARewrites the words in the HTML as capitalsBShows the letters as capitals without changing the HTML
- What does line-height control?AThe space between lines of textBThe height of each letter
- Which property sets the colour of the text itself?AcolorBtext-color
Key terms
Students type the meaning of:
text-align
Match the pairs
text-align: center;Match it to what it doestext-decoration: underline;Match it to what it doestext-transform: capitalize;Match it to what it doesThe space between lines of textMatch it to what it doestext-align: middle;Match it to what it doestext-colour: red;Match it to what it doesFill in the blanks
p { text-align: ______; }Hint: Type the value that centres the text
a { text-decoration: ____; }Hint: Type the value that removes the underline from a link
h2 { ______________: uppercase; }Hint: Type the property that changes the letter case of text
p { ___________: 1.5; }Hint: Type the property that sets the space between lines of text
h1 { letter-spacing: ___; }Hint: Type the value 2px to add a little space between letters
Spot the error
Question 1
Ap {B text-align: middle;C}
Question 2
Aa {B text-decoration: no;C}
Question 3
Ah1 {B text-transform: uppercaseC color: navy;D}
Question 4
Ap {B line height: 1.6;C}
Question 5
Ah2 {B text-colour: red;C}
