Chromatin is a complex of DNA and proteins (mainly histones) that forms within the nucleus of eukaryotic cells and serves as the material from which chromosomes are organized. It helps package DNA into a smaller volume to fit in the cell, control gene expression, and facilitate DNA replication.