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