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

Answer key

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

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