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