53

Are there any lists of default CSS stylesheets for different browsers? (browser stylesheets in tabular form)

I want to know the default font of text areas across all browsers for future reference.

Matt Way
  • 32,319
  • 10
  • 79
  • 85
AnnanFay
  • 9,573
  • 15
  • 63
  • 86
  • OK, I understand that. So far I'm not having much luck researching this so it could be a good data collection/reference project someday! I know Firefox and IE have differences in how textareas are handled (as with most things IE adds a scrollbar) but I think that the font size is usually the same. If you don't find anything I'd just add a note advising to set textarea fonts to a font-size for best use of the plugin - I'd find that pefectly acceptable. – Ross Aug 28 '08 at 19:01
  • I definitely would love to know the defaults when I'm trying to determine why a particular page is behaving in a way that doesn't fit with what Firebug is showing me. – dbreaux Jun 23 '12 at 19:17
  • Copy/paste message from Aug 28 '08 at 17:52 (before comments existed): [@Ross](http://stackoverflow.com/questions/32875/browsers-default-css#32880) & [Will Dean](http://stackoverflow.com/questions/32875/browsers-default-css#32880) I use a CSS reset normally however I can't now as it's for a jQuery plugin and I can't really change other peoples fonts. – AnnanFay Oct 10 '16 at 15:29
  • Something similar [here](http://stackoverflow.com/q/6867254/465053) – RBT May 09 '17 at 22:21
  • @RBT Damn, even though my question has precidence normally under these circumstances this one would be closed because that one has twice as many votes and many more stars. I suppose the difference is I am not limiting my question to HTML elements. The argument can be made that this question also covers styling for SVG elements. I'm kinda pissed that the question he posted got so much more traction even after he linked here and noted they are duplicates. Also note that the accepted answer at the time he posted did not suggest using a CSS reset. – AnnanFay May 09 '17 at 22:44
  • I have absolutely no intention to get your post marked as duplicate for closure. I just added a link for the readers so that they can also see the other post. For marking questions as duplicate I use flags. – RBT May 09 '17 at 22:49

6 Answers6

41

Not tabular, but the source CSS may be helpful if you're looking for something specific:

You're on your own with IE and Opera though.

Axel
  • 3,331
  • 11
  • 35
  • 58
robertc
  • 74,533
  • 18
  • 193
  • 177
  • 1
    Unfortunately, none of these files can be used as is since both of them use preprocessor directions. – balu Oct 10 '17 at 07:59
13

I suspect this is something of a moving target for all the browsers, but there is a default style sheet for HTML 4 as defined by the W3C.

Jacob van Lingen
  • 8,989
  • 7
  • 48
  • 78
Greg Hurlman
  • 17,666
  • 6
  • 54
  • 86
6

There probably is a list, this is why we use CSS Resets however.

Ross
  • 46,186
  • 39
  • 120
  • 173
4

CSS class have compiled a list of CSS2.1 User Agent Style Sheet Defaults. Some links at the bottom of that page as well.

Daniel James
  • 3,899
  • 22
  • 30
3

You cannot possibly know all defaults for all configurations of all browsers into the future.

The way people get around this is to start their CSS by resetting everything to known values. Here's an example from one of the main CSS experts: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

Will Dean
  • 39,055
  • 11
  • 90
  • 118
1

There was some discussion and testing done on www-style not too long ago:

http://lists.w3.org/Archives/Public/www-style/2008Jul/0124.html

http://lists.w3.org/Archives/Public/www-style/2008Jul/att-0124/defaultstyles.htm

Shadow2531
  • 11,980
  • 5
  • 35
  • 48