The answer varies by locality. If yours don’t get recycled, try to collect loose caps and lids in a plastic bag. Seal the bag before you put it in the trash. By doing this, you reduce the chances that these lids and caps become marine debris.