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

Answer key

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

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