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

Answer key

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

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