The cell envelope is composed of the cell wall, cell membrane, and outer membrane.
The cell envelope of gram-positive bacteria comprises the cell wall, cytoplasmic membrane, and capsule.
The cell envelope of gram-negative bacteria generally comprises the cell wall, cytoplasmic membrane, outer membrane, periplasmic space, and the capsule.
The bacterial cell envelope is the outermost layer of the bacterial cell and its primary purpose is to protect the cell from the external environment.
Alternatively, it also serves other functions like maintaining the shape and rigidity of cells as well as enabling communication with the environment.