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

Answer key

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

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