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

Answer key

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

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