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

Answer key

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

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