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