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

Answer key

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

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