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

Answer key

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

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