Where do Browser Styles Come From? @MozillaDeveloper
Where do Browser Styles Come From?  @MozillaDeveloper
Uploaded December 2019 | Updated September 2026, 2 weeks ago
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. But how can we see these UA styles? Miriam Suzanne will show you how to find them online, inside Firefox itself, or even in developer tools as we debug our site styles.

- Firefox: resource://gre-resources/html.css or hg.mozilla.org/mozilla-central/file/tip/layout/style/res/html.css
- Chrome: chromium.googlesource.com/chromium/blink/+/master/Source/core/css/html.css
- Webkit: trac.webkit.org/browser/trunk/Source/WebCore/css/html.css
- More: meiert.com/en/blog/user-agent-style-sheets

#css #miriamsuzanne #firefoxdevtools
Where do Browser Styles Come From?The MDN Curriculum: Better web developers for a better web - Feb. 4, 2024Mozilla Community Call - September 1,  2022 #mdn #opensource #communityEdit your CSS Shapes with the Shape Path EditorFakespot talk & demoEveryone’s a Performance Engineer: How to optimize your website with the Firefox ProfilerKeep Track of Changes to CSS Youve Made in DevToolsFast UDP makes QUIC quicker - optimizing Firefox’s HTTP3 IO stackPower profiling with the Firefox ProfilerSolo - Office HoursDiscover the wonderful ways in which the Mozilla Community is using Hubs!Community Meeting - August 20, 2025
Mozilla Developer |

Where do Browser Styles Come From?

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER