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