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