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

Answer key

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

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