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

Answer key

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

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