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