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

Answer key

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

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