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