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