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