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

Answer key

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

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