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

Answer key

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

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