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