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

Answer key

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

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