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