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