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

Answer key

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

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