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