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

Answer key

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

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