What is the best site to find the default CSS properties of HTML elements?
Many of the HTML elements come with some default CSS properties which can sometimes result in unknown/unwanted behaviour. For example Input boxes are displayed differently in different browsers. I'm looking for a place that covers the new CSS3 properties and the new HTML5 elements. I've seen in other (much older) questions (such as Browser's Default CSS) answers that suggest a solution of CSS reset. This solution is sometimes not wanted, often I would actually like to keep some of the basic properties (such as the highlighting of input boxes in Chrome). In other words: I don't want to get rid of things just because I don't know what they do.
So, Is there a site that can give me all this information (or perhaps most)?
It's different for each browser, so:
- Firefox: http://mxr.mozilla.org/mozilla-central/source/layout/style/html.css. Or, browse to
resource://gre-resources/and look at
- Chrome: http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/css/html.css
- Internet Explorer, all versions: http://www.iecss.com/
As suggested by @robertc, you can also look at the HTML5 Boilerplate stylesheet, which "normalizes the display of a lot of stuff without being a reset in the traditional sense". It also fixes quite a few bugs/inconsistencies.