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

Answer key

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

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