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

Answer key

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

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