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

Answer key

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

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