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