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

Answer key

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

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