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