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

Answer key

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

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