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

Answer key

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

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