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