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