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