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

Answer key

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

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