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

Answer key

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

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