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

Answer key

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

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