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

Answer key

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

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