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

Answer key

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

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