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