Where do Browser Styles Come From?

Not sure where that default 8px of margin on the body comes from? Here's how to find out! Every browser provides a User Agent (UA) Stylesheet to give HTML elements their natural shape, and make our sites more readable by default. When we start a project with a reset or normalization stylesheet, it's the UA styles that we are re-setting or normalizing.

Discover the best of web development

Sign up for the Mozilla Developer Newsletter