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