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

Answer key

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

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