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