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

Answer key

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

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