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