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