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