Making Sense of CSS Length Units

September 8, 2025

Diagram showing geometric shapes filled with halftone dot patterns transitioning from low DPI (left) to high DPI (right), illustrating increased dot density and sharpness across orange, magenta, and teal shapes.

Junior developers who were recently introduced to CSS might be overwhelmed by the sheer number of various length-measuring units available. Someone might say not to use px as absolute units don’t change in responsive design but is that really the case?Let’s have a quick overview on the various units and when they can be useful.

Source: Making Sense of CSS Length Units

When CSS first arrived, it had just a handful of types of units, and only one or two that people ever really used: pixels and ems.
Now there are many, and they can be very daunting for those new to CSS. So here is a fantastic overview of all the kinds of units you might find obscure or common in CSS today.