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