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