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

Answer key

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

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