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