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