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