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

Answer key

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

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