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

Answer key

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

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