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