Search articles

Reset CSS

Let me introduce the Reset CSS that I personally use.

The traditional purpose of CSS resets was to ensure consistency across browsers by resetting all default styles to a blank slate.

However, the CSS reset I use does not fully serve that purpose.

I follow these principles:

  • Follow browser default styles as much as possible and keep the code to a minimum.
  • Only address common layout issues and accessibility concerns in this stylesheet.
  • Leave the base styles for each HTML tag to stylesheets loaded after reset.css.

It might be a bit unusual that I don’t reset padding to 0, leaving it at the browser default.

How to load this reset.css

This Reset CSS is used in Lism CSS.

I’ve made it possible to use just this reset.css standalone, so feel free to use it if you’d like.

<link href="https://cdn.jsdelivr.net/npm/lism-css/dist/css/reset.css" rel="stylesheet" />

All demo content on this site loads this reset.css

Many of the tips and implementation examples on this site include preview pages where you can see the actual output.

Since this reset.css is loaded on all those preview pages, please make sure to include it when copying code to test locally.