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

Answer key

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

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