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

Answer key

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

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