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

Answer key

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

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