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

Answer key

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

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