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

Answer key

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

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