Tea and coffee are safe to drink in moderation. However, over time, large amounts can cause staining and damage. In addition to caffeine, tea and coffee contain chromogens, deeply pigmented molecules that adhere to dental enamel. They also contain tannins, which boost a chromogen molecule's ability to attach to dental enamel. Black tea is worse than black coffee, because coffee is lower in tannins.