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

Answer key

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

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