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