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

Answer key

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

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