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

Answer key

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

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