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