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