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

Answer key

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

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