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