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

Answer key

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

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