What is a pixel and is this the only measure of font size?

It goes against accessibility guidelines to restrict scalability, though in certain circumstances it may be necessary to preserve usability, albeit rarely.

why would zooming be disabled in a web page? - Google Search

Perfect questions and answers. If I may add one ā€œtrickā€ that I use: I usually set the html font to 62.5%, doing

html {
  font-size: 62.5%;
}

This makes the whole font-size of the document to 10px:

62.5% * 16px = 0.625 * 16px = 10px

With this change, every time that I need to use some px unit because of the project, I easily change from px to rem just positioning the decimal separator one place to the left. For example: suppose that some <h2> element has 24px as font-size, so in rem I use 2.4rem.

It may seem unnecessary, but if your project has several different font sizes in px this can help you save some time.

4 Likes

Iā€™m now even more confused.

Superb clarification

1 Like