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

Answer key

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

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