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

Answer key

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

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