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