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