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