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

Answer key

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

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