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

Answer key

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

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