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

Answer key

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

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