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