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