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