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

Answer key

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

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