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

Answer key

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

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