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