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

Answer key

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

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