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