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