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

Answer key

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

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