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