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

Answer key

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

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