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