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