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