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

Answer key

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

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