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

Answer key

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

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