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