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