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

Answer key

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

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