PX, EM or REM?

I’m currently working on my own portfolio site and have had conflicting bits of information on best practice on how to size fonts . I have a friend who works in industry and has said he has never come across people using EM/REM previously and everything is done in PX.

Which should I get into the habit of using? Should I force myself to utilise rem whenever possible?


I would say yes, if you use pixels for the font, when a person wants to configure it to have a larger one in its device, they won’t be able to.
What I usually do is to set the html to:
font-size: 62.5%
So every rem will be 10 pixels each, and you can calculate the pixels easily.

1 Like