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

Answer key

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

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