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

Answer key

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

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