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