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

Answer key

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

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