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

Answer key

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

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