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

Answer key

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

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