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