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

Answer key

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

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