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