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