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