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