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