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

Answer key

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

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