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

Answer key

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

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