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

Answer key

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

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