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