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