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