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