Why px fails for accessibility, and how rem and em scale gracefully.
Pixels (px) are absolute units. If a user changes their browser's default font size for accessibility (e.g., from 16px to 24px because of poor vision), elements sized in pixels will not scale up. Relative units like rem and em respect the user's preferences.
px)The quick brown fox jumps over the lazy dog. (Always 16px)
rem)The quick brown fox jumps over the lazy dog. (1 rem)
em)The quick brown fox jumps over the lazy dog. (1 em)