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