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