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