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