How to use the CSS reset generator
- Choose the Style: Modern, Minimal or Normalise-style.
- Tick Responsive media defaults so images and videos never overflow their container.
- Tick Form controls inherit fonts so inputs and buttons use your page font.
- Tick Text wrapping helpers and Respect reduced motion as you like.
- Save the output as
reset.cssand load it before your other styles.
What it does and when to use it
Every browser applies its own default styles: margins on headings and paragraphs, small system fonts in form fields, images that can spill out of narrow columns. A reset evens these out so your own CSS behaves the same everywhere.
Use it at the start of any hand-written stylesheet or small site without a framework. Put your design tokens from the CSS variables generator right after the reset, and add breakpoints with the media query generator. Tailwind already includes its own reset, so skip this file if you use the Tailwind config generator.
How it works
All three styles start with box-sizing: border-box on every element, so padding and borders sit inside the width you set.
| Style | What it adds |
|---|---|
| Modern | Removes all margins; body line-height: 1.5 and min-height: 100vh; tighter heading line height; list styles off for role="list"; :target clears sticky headers; turns off automatic text inflation on mobile |
| Minimal | Removes all margins; body line-height: 1.5 |
| Normalise-style | Keeps margins; fixes h1 size, bolder for b and strong, monospace code, sub/sup and table borders |
The extras are added after the style: block-level media with max-width: 100%, form controls with font: inherit, text-wrap: balance for h1 to h3 and pretty for paragraphs, and a prefers-reduced-motion block. MDN covers the box-sizing property in detail.
Worked examples
Modern with all extras (defaults). Besides the margin and sizing rules, the file includes:
/* 6. Anchor targets clear sticky headers */
:target {
scroll-margin-block: 5ex;
}
and img, picture, video, canvas, svg with display: block and max-width: 100%.
Bare minimum. Style Minimal with every extra unticked. The whole file is the border-box rule, * { margin: 0; } and body { line-height: 1.5; }.
Normalise-style, no media rule. The output keeps a 2em h1 with margin: 0.67em 0; and font-weight: bolder; for b and strong, plus the form, text-wrap and reduced-motion extras.
Limits and tips
- Media become block elements. An image inside a line of text will start on its own line; set
display: inlineon that image if needed. - Text-wrap rules are ignored by browsers that do not support them yet, which is harmless.
- Margins are gone in Modern and Minimal. Add spacing back with your own rules, for example a gap between paragraphs.
Frequently asked questions
What is the difference between a reset and normalize?
Why does the modern reset only remove list styles from lists with role="list"?
Where do I put the reset in my stylesheet?
Will the reduced-motion rule break my animations?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.