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