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