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

Answer key

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

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