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