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