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