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