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

Answer key

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

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