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

Answer key

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

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