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

Answer key

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

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