Should I set the default font-size on the body or html element?

joshnh picture joshnh · Aug 2, 2011 · Viewed 64.5k times · Source

I like to work in ems when creating websites. Therefore I set a default font-size of 100.01% on the body element.

My question is should I set the default font-size on the body or the html element? What are the pros and cons (if any) of both?

Answer

joshnh picture joshnh · Jul 16, 2012

Now that the rem unit is starting to become popular, setting the base font-size on the root element (html tag) is advised (rem stands for root em).