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