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