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

Answer key

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

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