CSS length values
Length values use distance units. If you want a box to be 50px, set its value, and it will always be 50px on all devices. As with all CSS dimensions, there is no space between the unit name and the number.
Pixels are one of the absolute length units you can use to set an element's dimensions — and the most common one. Technically, you can set values in inches and centimeters, although it's not very common.
Relative length units are relative to something else. For example, the most commonly used are rem and em, which are calculated based on the font size of the root and parent element, respectively. There are over 20 possible length units.[1]