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