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