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

Answer key

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

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