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

Answer key

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

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