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

Answer key

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

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