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