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

Answer key

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

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