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