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