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