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