Cell envelope is the covering of a prokaryotic cell that protects it from injuries and shock. From outside to inside it has the following layers –
Glycocalyx – It is made up of macromolecules and could be loose (called slime layer) or thick (called capsule).
Cell wall – It is made of peptidoglycan and is just below the Glycocalyx. Its functions are to provide shape and structural support and protect bacteria from bursting or collapsing. So Bacteria can either take up Gram stain (Gram-positive bacteria) or cannot take up Gram stain (Gram-negative bacteria).
Plasma membrane – This innermost layer is semi-permeable. It functions to prevent leakage from the cell and allow the exchange of material between the inside and outside of the cell.