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

Answer key

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

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