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

Answer key

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

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