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