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