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

Answer key

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

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