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