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