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

Answer key

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

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