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