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