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

Answer key

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

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