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