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

Answer key

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

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