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

Answer key

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

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