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

Answer key

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

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