Search code examples
htmlcsspixel

Are centimeters on websites always the same for everyone?


I wanted to ask if centimeters on websites are always the same for everyone. I read somewhere that pixels are getting displayed different based on your current hardware. If I have an A4 page for instance on my website, and I want users to print it out, will every user with different hardware specs get the very same results?


Solution

  • If you want to print text you should use "em, cm, mm, in, pt, pc, %" . These units come from typographia, they have absolute measures.

    On the other hand "px" doesn't act like a constant but depends on hardware, you can learn more at : https://www.w3.org/Style/Examples/007/units.en.html .