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

Answer key

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

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