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