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

Answer key

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

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