HTML Worksheet: Images and Alt Text
Code tip (File and words): <img src="file.jpg" alt="what it shows" width="200"> — no closing tag. src = which file to load; alt = words describing it; width / height = size in pixels. If the picture fails, the browser shows the alt text; screen readers read it aloud.
NameDateTime takenScore ___ / 40
-
1.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="250"> (a) Our school bus (b) width (c) moon.png (d) The full moon - 2.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) alt (c) src (d) height
-
3.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> - 4.True or false: in <img>, src describes the picture. (a) False (b) True
- 5.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
- 6.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
-
7.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> - 8.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
-
9.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="50"> -
10.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="200"> (a) Map of India (b) map.png (c) dog.jpg (d) cake.jpg - 11.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
- 12.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) width (b) The full moon (c) dog.jpg (d) A happy dog -
14.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="350"> (a) tiger.jpg (b) bus.jpg (c) Our school bus (d) fort.jpg -
15.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> - 16.True or false: in <img>, height tells which image to load. (a) True (b) False
-
17.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) cake.jpg (b) kite.png (c) map.png (d) A red kite -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) width (b) Map of India (c) kite.png (d) A red kite - 19.True or false: in <img>, src sets how wide it is. (a) False (b) True
-
20.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="150"> (a) bus.jpg (b) moon.png (c) The full moon (d) fort.jpg -
21.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="350"> - 22.True or false: in <img>, alt is read by screen readers. (a) True (b) False
-
23.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="100"> -
24.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="350"> (a) map.png (b) Map of India (c) Birthday cake (d) width -
25.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="50"> - 26.True or false: in <img>, src tells which image to load. (a) False (b) True
-
27.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="50"> (a) width (b) A tiger asleep (c) fort.jpg (d) An old fort -
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) Our school bus (b) width (c) An old fort (d) bus.jpg - 29.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
-
30.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="250"> - 31.True or false: in <img>, alt sets how wide it is. (a) False (b) True
-
32.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="300"> (a) cake.jpg (b) map.png (c) kite.png (d) A red kite - 33.True or false: in <img>, alt describes the picture. (a) False (b) True
-
34.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="250"> - 35.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) width (d) height
- 36.True or false: in <img>, height shows if the image fails. (a) False (b) True
-
37.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="200"> -
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) A happy dog (b) The full moon (c) width (d) dog.jpg - 39.True or false: in <img>, alt tells which image to load. (a) True (b) False
- 40.True or false: in <img>, height sets how wide it is. (a) False (b) True
Answer key
- The full moon
- alt
- 250
- False
- to describe the image
- alt
- 100
- src
- 50
- map.png
- <img>
- No
- A happy dog
- bus.jpg
- 150
- False
- kite.png
- A red kite
- False
- moon.png
- 350
- True
- 100
- Map of India
- 50
- True
- An old fort
- Our school bus
- src
- 250
- False
- kite.png
- True
- 250
- alt
- False
- 200
- A happy dog
- False
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids