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

Answer key

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

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