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