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