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