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

Answer key

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

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