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

Answer key

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

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