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