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