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