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