User Agent Style Sheets: Basics and Samples
Published on Sep 22, 2007 (updated Apr 16, 2025), filed under development (feed). (Share this on Mastodon or Bluesky?)
This and many other posts are also available as a pretty, well-behaved ebook: On Web Development.
CSS manages the default formatting of documents through the concept of user agent style sheets, a cornerstone of the cascade. This means that a web browser doesnât just present a line of text when itâs fed with an HTML document that has no styling information, but instead serves it using minimal formatting.
Specification
CSSÂ 1 introduces the idea by stating that âeach User Agent (UA, often a âweb browserâ or âweb clientâ) will have a default style sheet that presents documents in a reasonableâbut arguably mundaneâmanner.â CSSÂ 2 says that âconforming user agents must apply a default style sheet (or behave as if they did)â and that âa user agentâs default style sheet should present the elements of the document language in ways that satisfy general presentation expectations for the document language.â CSSÂ 3 is of the same mind.
Since the CSS specifications leave it up to implementations whether to use a ârealâ style sheet for default display or not, itâs not surprising that you donât find a default style sheet in every browserâs installation folder. Unlike Microsoftâs Internet Explorer as well as Opera, however, Gecko browsers like Firefox and Netscape Navigator (âhtml.cssâ) but also Konqueror make it rather simple to comprehend their default styles.
User Agent Style Sheets
The following is a [maintained] list of default style sheets Iâve compiled over recent years. Due to the fact that Firebird, Firefox, and Co. are all based on the same layout engine, their style sheets are similar, if not identical.
- Chrome (January 26, 2011)
- Chrome (July 17, 2013)
- Chrome (September 2, 2015)
- Chrome (February 11, 2019)
- Chrome (August 26, 2021)
- Chrome (May 3, 2023)
- Chromium (November 12, 2024)
- Chromium (latest)
- Firebird 0.7
- Firefox 0.8
- Firefox 0.9
- Firefox 1.5.0.4
- Firefox 2.0.0.6
- Firefox 2.0.0.12
- Firefox 3.0b3
- Firefox 3.0.1
- Firefox 3.0.8
- Firefox 3.6.13
- Firefox 3.6.3
- Firefox (March 31, 2019)
- Firefox (February 3, 2021)
- Firefox (March 28, 2023)
- Firefox (January 17, 2024)
- Firefox (January 26, 2025)
- Firefox (latest)
- Flock 0.9.0.2
- Flock 1.2.4
- Flock 1.2.7
- Gecko (latest)
- Internet Explorer 6
- Internet Explorer 7
- Internet Explorer 8
- Internet Explorer 9
- Konqueror 3.2.0
- Mozilla 1.0.1
- Mozilla 1.5
- Navigator 6.1
- Navigator 7.1
- Navigator 8.1
- Navigator 9.0b3
- Opera 10.51
- Safari 3.0.4
- Safari 3.1.2
- Safari (January 29, 2013)
- Safari (May 21, 2015)
- Safari (November 5, 2018)
- Safari (April 3, 2019)
- Safari (April 1, 2021)
- Safari (May 27, 2022)
- SeaMonkey 1.1.2
- WebKit (latest)
For comparison, note a 1998 âbase style sheet,â as well as the default style sheets proposed by the W3C in the specifications of CSSÂ 1, CSSÂ 2, CSSÂ 2.1, and CSSÂ 2.2:
User Agent and Reset Style Sheets
The examples aim to provide some insight into user agent style sheets. Knowledge of user agent style sheets should help get a better understanding of CSS as well as any display âphenomena.â
However, I encourage to use this knowledge for other things than building more or larger âresetâ style sheets. Assuming use of additional style sheets other than just a reset, reset style sheets are typically unnecessary. From my experience, the only occasionally helpful and then quite memorable reset is * { margin: 0; padding: 0; }
. Reset style sheets are going to be handled in other posts though, revealing why theyâre, well, bad. [Still in doubt? Try this sanity check: Use your preferred reset, then temporarily remove it and see what happens.]
Many thanks to Martin Hassman and GermĂĄn FreixinĂłs LĂłpez for their help to improve this collection!
About Me
Iâm Jens (long: Jens Oliver Meiert), and Iâm a web developer, manager, and author. Iâve worked as a technical lead and engineering manager for small and large enterprises, Iâm an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for OâReilly and Frontend Dogma.
I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)