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

Answer key

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

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