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