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

Answer key

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

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