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