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

Answer key

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

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