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