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