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