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

Answer key

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

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