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

Answer key

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

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