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