II.
Reset Stylesheets and HTML5.
There are two important reset stylesheets out there, on the loose: Eric Meyer’s reset.css and YUI’s CSS Reset. Both are highly useful, though they differ slightly in the details of their approach and implementation. Eric intends for you to take his CSS and alter it to your needs, creating a reset stylesheet that works for your own projects. He describes it as:
The reset styles given here are intentionally very generic.… In other words, this is a starting point, not a self-contained black box of no-touchiness.
Yahoo, on the other hand, is aiming for a more complete resetting. They write:
The foundational CSS Reset removes the inconsistent styling of HTML elements provided by browsers. This creates a dependably flat foundation to built upon.
For a couple of years now, since Eric first described his ideas, I’ve used my own reset.css. A combination of Eric’s original code and YUI’s more comprehensive styles, modified here and there as needed. It has served well on many projects.
Now that HTML5 is at last upon us, my reset.css no longer quite fits the bill. For one thing, there are new elements that bring with them new default styles, which of course need resetting. For a second, other elements have been deprecated, and so I no longer need to worry about them. (Of course, you might, since your project might be different.) And for a third, and possibly most important, few of the new elements are supported sufficiently by the browsers.
Given all this, I’ve updated my reset stylesheet. It ignores deprecated elements, and gives the new ones display styles as needed. This also is not a self-contained box of resetting, but I do find it quite useful. You can find it on GitHub, along with some additional notes. You’re free to use it as you like. As always, please do let me know if you notice any problems or have any suggestions.