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