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