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