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

Answer key

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

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