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

Answer key

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

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