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

Answer key

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

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