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

Answer key

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

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