It used to be that these distinctions mattered: for example, back in the IE6 days, you should never set your text using
px, because then it couldn't be zoomed. That is, back in the day, browsers actually treated
px as a number of pixels.
These days, browsers have conformed to web reality: most people use
px everywhere, for almost everything. Thus
px is now defined as an angular measurement, which essentially means that
px behaves just fine in any zoom setting and on any size or DPI device.
Similarly, as part of conforming to web reality, all other units are defined in terms of
px, so there is really no reason to use them unless it happens to be more convenient for your case. The only exception is, of course, percentages, since they allow you to specify values in relation to parents' measurements.
Details from the spec:
pc are all defined relative to
px, since in practice all devices follow "For a CSS device, these dimensions are ... anchored ... (ii) by relating the pixel unit to the reference pixel." And as discussed, the "reference pixel" is an angular measurement that varies depending on DPI settings, screen size, zoom level, device type and so on.
1em equals the computed
font-size of an element, which is usually defined in
px. If that size itself is defined in
exs, the browser then looks upward until it finds a
px to be relative to, eventually falling back to the default
1ex equals the height of the letter "x" in the defined
font-size if possible, but usually (?) falls back to