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