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

Answer key

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

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