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