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

Answer key

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

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