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