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

Answer key

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

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