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

Answer key

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

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