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

Answer key

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

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