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