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