Bacteria have either a gram-positive or gram-negative cell wall structure. Gram-positive bacteria have a thick peptidoglycan layer that retains crystal violet dye, while gram-negative bacteria have a thinner peptidoglycan layer and lipopolysaccharide outer membrane, causing them to take up the counterstain. Bacterial cell walls provide shape, protection from osmotic damage, and are the target of antibiotics.