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