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