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

Answer key

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

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