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