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