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

Answer key

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

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