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

Answer key

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

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