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

Answer key

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

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