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

Answer key

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

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