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