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