The pigment in coffee and tea leaves a tannin stain in carpeting when they're spilled. While both of these stains can be stressful, they needn't become permanent. A prompt response time helps to remove the stain before it can be absorbed into surrounding fibers. If milk and sugar have been added to your hot beverage, it's vital to treat the stain accordingly to avoid leaving a sticky residue behind.
Absorb coffee or tea liquid from the carpet by covering the stain with table salt. Pour a mound of salt over the stain and allow it to absorb the liquid for 20 minutes. Vacuum the carpet to remove the salt.
Treat the stain with an enzyme-based stain remover product if milk or cream was in the beverage. The enzymes break down the protein in the cream to prevent the milk from souring and leaving an unpleasant odor in the carpet. Sponge the carpeting with the enzyme stain remover, moving from the outside of the stain in toward the middle.
Combine 1/3 cup of white vinegar with 2/3 cup of water in a spray bottle. Spray the diluted vinegar on the remaining coffee or tea stain in the carpet. Blot the stain with a clean cloth to absorb the stain. Move to a clean part of the cloth as the coffee or tea stain is lifted.
Mix 1/4 tsp. of dishwashing detergent with 1 qt. of warm water. Dip a clean cloth in the soapy solution and sponge the remaining coffee or tea stain until it's removed. Use a cloth dampened with water to rinse the detergent solution out of the carpet.
Lay clean dry cloths on the carpet. Stand on the clothes or press against them with your hands to wick moisture out of the carpet and into the cloth. Let the carpet air dry completely.