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

Answer key

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

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