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