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

Answer key

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

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