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

Answer key

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

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