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