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

Answer key

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

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