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