px
px
px
CSS Unit Converter translates between px, rem, em, vw, vh, pt and cm, using the root font size and viewport dimensions you specify.
px is absolute. rem is relative to the root font size, which defaults to 16px but changes if the user has increased their browser's base font size. em is relative to the parent element's font size, which is why nested em values compound and become hard to predict.
The accessibility argument favours rem for font sizes and spacing, because a reader who has raised their default font size gets a proportionally larger layout. Viewport units scale with the window and ignore that setting entirely, which is why pure vw typography is an accessibility problem.
v1.0