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