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

Answer key

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

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