CSS Worksheet: Colour and Text Properties
Code tip (Letters, behind, size, place): color = colour of the letters; background-color = colour behind them. font-size = how big (e.g. 20px); font-weight: bold = thick letters; font-family = the font. text-align: left / center / right places the text on its line.
NameDateTime takenScore ___ / 40
- 1.🖌️ Which CSS property picks the font style? (a) font-weight (b) text-align (c) font-family (d) color
-
2.🖌️ How big is the text, in px?
h2 {
background-color: green;
font-size: 24px;
text-align: left;
color: black;
} -
3.🖌️ What colour is behind the letters?
h1 {
background-color: green;
font-size: 28px;
color: blue;
text-align: left;
} (a) black (b) blue (c) green -
4.🖌️ Where does the text sit on its line?
h1 {
font-size: 12px;
color: red;
background-color: purple;
text-align: left;
} (a) in the middle (b) on the right (c) on the left - 5.🖌️ Which CSS property makes the text bold? (a) font-weight (b) background-color (c) font-size (d) font-family
-
6.🖌️ Where does the text sit on its line?
p {
background-color: white;
color: blue;
font-size: 12px;
text-align: center;
} (a) on the left (b) in the middle (c) on the right - 7.What does font-weight do? (a) picks the font style (b) sets the letter colour (c) makes the text bold (d) colours behind the text
- 8.What does font-size do? (a) makes letters bigger (b) picks the font style (c) makes the text bold (d) centres a heading
-
9.🖌️ What colour are the letters?
h1 {
text-align: right;
font-size: 32px;
background-color: green;
color: blue;
} (a) green (b) red (c) blue - 10.🖌️ Which CSS property sets the letter colour? (a) color (b) background-color (c) font-size (d) text-align
- 11.What does font-family do? (a) makes letters bigger (b) sets the letter colour (c) picks the font style (d) colours behind the text
-
12.🖌️ What colour are the letters?
h2 {
text-align: right;
color: red;
font-size: 20px;
background-color: green;
} (a) green (b) blue (c) red -
13.🖌️ What colour is behind the letters?
h1 {
text-align: right;
color: orange;
font-size: 20px;
background-color: red;
} (a) red (b) orange (c) green -
14.🖌️ What colour is behind the letters?
li {
text-align: center;
background-color: red;
font-size: 24px;
color: black;
} (a) red (b) black (c) orange -
15.🖌️ What colour are the letters?
h1 {
color: purple;
text-align: right;
background-color: green;
font-size: 32px;
} (a) white (b) green (c) purple - 16.🖌️ Which CSS property colours behind the text? (a) font-weight (b) font-family (c) background-color (d) color
-
17.🖌️ How big is the text, in px?
li {
font-size: 20px;
color: orange;
background-color: blue;
text-align: center;
} -
18.🖌️ What colour is behind the letters?
h2 {
text-align: left;
background-color: purple;
font-size: 16px;
color: black;
} (a) purple (b) black (c) orange - 19.What does color do? (a) sets the letter colour (b) centres a heading (c) picks the font style (d) makes letters bigger
- 20.🖌️ Which CSS property makes letters bigger? (a) font-family (b) font-size (c) color (d) font-weight
-
21.🖌️ What colour are the letters?
p {
text-align: left;
background-color: yellow;
color: green;
font-size: 36px;
} (a) green (b) yellow (c) blue -
22.🖌️ What colour is behind the letters?
h1 {
text-align: center;
color: white;
background-color: blue;
font-size: 20px;
} (a) white (b) purple (c) blue -
23.🖌️ What colour are the letters?
li {
background-color: blue;
font-size: 28px;
text-align: center;
color: orange;
} (a) orange (b) blue (c) white -
24.🖌️ What colour is behind the letters?
h2 {
color: white;
font-size: 40px;
text-align: left;
background-color: black;
} (a) white (b) green (c) black - 25.What does text-align do? (a) makes the text bold (b) picks the font style (c) centres a heading (d) colours behind the text
-
26.🖌️ What colour is behind the letters?
p {
color: green;
background-color: red;
text-align: center;
font-size: 32px;
} (a) purple (b) red (c) green -
27.🖌️ How big is the text, in px?
h1 {
color: yellow;
background-color: white;
text-align: center;
font-size: 28px;
} -
28.🖌️ How big is the text, in px?
li {
color: red;
text-align: right;
font-size: 40px;
background-color: blue;
} - 29.🖌️ Which CSS property centres a heading? (a) font-family (b) font-size (c) text-align (d) color
-
30.🖌️ What colour are the letters?
h2 {
background-color: green;
text-align: right;
font-size: 20px;
color: yellow;
} (a) purple (b) green (c) yellow -
31.🖌️ What colour are the letters?
h2 {
background-color: red;
text-align: left;
font-size: 24px;
color: black;
} (a) blue (b) black (c) red -
32.🖌️ How big is the text, in px?
h2 {
color: orange;
text-align: right;
font-size: 28px;
background-color: red;
} - 33.What does background-color do? (a) makes the text bold (b) colours behind the text (c) makes letters bigger (d) picks the font style
-
34.🖌️ Where does the text sit on its line?
h2 {
background-color: green;
color: blue;
text-align: left;
font-size: 16px;
} (a) in the middle (b) on the left (c) on the right -
35.🖌️ Where does the text sit on its line?
h2 {
background-color: purple;
text-align: center;
font-size: 32px;
color: green;
} (a) on the right (b) in the middle (c) on the left -
36.🖌️ What colour is behind the letters?
p {
background-color: orange;
color: red;
font-size: 20px;
text-align: center;
} (a) red (b) black (c) orange -
37.🖌️ Where does the text sit on its line?
h1 {
background-color: purple;
color: white;
font-size: 32px;
text-align: center;
} (a) on the left (b) on the right (c) in the middle -
38.🖌️ What colour are the letters?
p {
font-size: 36px;
color: white;
background-color: green;
text-align: center;
} (a) red (b) green (c) white -
39.🖌️ What colour is behind the letters?
li {
color: red;
text-align: center;
background-color: white;
font-size: 24px;
} (a) white (b) yellow (c) red -
40.🖌️ What colour is behind the letters?
h1 {
text-align: left;
font-size: 24px;
background-color: blue;
color: orange;
} (a) blue (b) orange (c) green
Answer key
- font-family
- 24
- green
- on the left
- font-weight
- in the middle
- makes the text bold
- makes letters bigger
- blue
- color
- picks the font style
- red
- red
- red
- purple
- background-color
- 20
- purple
- sets the letter colour
- font-size
- green
- blue
- orange
- black
- centres a heading
- red
- 28
- 40
- text-align
- yellow
- black
- 28
- colours behind the text
- on the left
- in the middle
- orange
- in the middle
- white
- white
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids