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