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

Answer key

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

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