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