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

Answer key

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

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