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

Answer key

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

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