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