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

Answer key

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

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