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