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

Answer key

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

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