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