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

Answer key

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

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