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