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