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

Answer key

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

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