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

Answer key

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

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