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

Answer key

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

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