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

Answer key

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

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