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

Answer key

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

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