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