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