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