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

Answer key

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

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