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