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