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

Answer key

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

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