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