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