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