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

Answer key

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

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