Teichoic acids are bacterial polysaccharides of glycerol phosphate or ribitol phosphate linked via phosphodiester bonds. These acids are present in the cell wall of Gram (+ve) bacteria eg, Staphylococci, Streptococci, etc. The main function of teichoic acid is to provide rigidity to the cell wall by attracting cations such as magnesium and sodium.