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