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