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

Answer key

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

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