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

Answer key

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

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