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

Answer key

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

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