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