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