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