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