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

Answer key

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

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