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