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