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

Answer key

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

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