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

Answer key

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

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