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