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