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