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