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

Answer key

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

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