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

Answer key

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

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