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