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

Answer key

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

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