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