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

Answer key

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

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