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

Answer key

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

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