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

Answer key

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

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