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

Answer key

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

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