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