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