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