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

Answer key

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

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