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

Answer key

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

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