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