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