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

Answer key

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

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