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

Answer key

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

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