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