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

Answer key

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

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