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