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