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

Answer key

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

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