Cephalosporins are a class of antibiotics derived from the fungus Cephalosporium. They contain a β-lactam ring and are divided into generations based on their antimicrobial spectrum and date of development. They work by inhibiting bacterial cell wall synthesis. Newer generations have increased activity against gram-negative bacteria. Adverse effects include diarrhea, hypersensitivity reactions, and nephrotoxicity in some cases. They are used to treat a variety of bacterial infections. Other β-lactam antibiotics with different structures include monobactams, carbapenems, and carbacephems which also have broad-spectrum antibacterial activity.