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