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

Answer key

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

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