Web Browser (User Agent) Built-In CSS
Every web browser has a built-in (User Agent) style sheet for rendering default HTML elements. Here are the locations for those UA style sheets:
- W3C & WHATWG
- Firefox
- Mercurial, at
mozilla-central/layout/style/res/html.css
(or look at dxr.mozilla.org) - GitHub, at
gecko-dev/layout/style/res/html.css
- In Firefox, open
resource://gre-resources/
& then selecthtml.css
- Mercurial, at
- Safari, at
trunk/Source/WebCore/css/html.css
- Chrome & Opera, at
chromium/chromium/blink/master/Source/core/css/html.css
- Microsoft
- IE 6–9 (Trident) (Note that the bottom of this page contains links to user-agent style sheets for Edge, Chrome, Firefox, & Safari)
- Edge 13
- Opera (pre-Blink)
UA style sheets from 2014 can be found on GitHub at sw4/revert.css.
HTML5 Boilerplate is an attempt to solve any inconsistencies (which there aren’t many of anymore).
Original pointers from Stack Overflow & Jens Oliver Meiert.
Updated 2017-10-30 to fix broken links & add link to HTML5 Living Standard.