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

Answer key

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

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