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