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