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

Answer key

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

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