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