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