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

Answer key

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

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