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

Answer key

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

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