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

Answer key

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

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