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