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

Answer key

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

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