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