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