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

Answer key

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

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