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

Answer key

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

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