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