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