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

Answer key

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

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