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