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

Answer key

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

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