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

Answer key

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

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