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