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

Answer key

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

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