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