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