← Images with img, src and alt lesson New set →

HTML Worksheet: Images and Alt Text

HTML and CSS lesson 7: Images with img, src and alt · Set 130 · 40 questions
TalentJR

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

Answer key

  1. alt
  2. A tiger asleep
  3. src
  4. <img>
  5. tiger.jpg
  6. kite.png
  7. 350
  8. Map of India
  9. cake.jpg
  10. cake.jpg
  11. An old fort
  12. Map of India
  13. No
  14. A tiger asleep
  15. False
  16. The full moon
  17. src
  18. 300
  19. cake.jpg
  20. True
  21. False
  22. 350
  23. A red kite
  24. to describe the image
  25. alt
  26. True
  27. bus.jpg
  28. 250
  29. Our school bus
  30. A red kite
  31. 150
  32. Our school bus
  33. Our school bus
  34. False
  35. 100
  36. moon.png
  37. True
  38. Our school bus
  39. True
  40. map.png

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids