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

Answer key

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

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