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