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