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