A CSS unit is the standard of measurement used in CSS to express the size of an element’s property. Examples are px, em, rem, fr, and vh.
The difference between document, data, and code is that a document holds data. Data is a page’s content. And code is a computer’s language.