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