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