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

Answer key

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

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