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