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