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

Answer key

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

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