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