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

Answer key

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

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