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