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