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

Answer key

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

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