π What Is a CSS Reset?
A CSS Reset removes all default browser styling (margins, paddings, headings, lists, etc.) to ensure your webpage starts from a clean, consistent baseline across all browsers.
Note
β Provides a blank starting point
β Ideal for custom UI systems
π What Is Normalize.css?
Normalize.css is a modern alternative to a reset. Instead of removing all defaults, it preserves useful browser styles andnormalizes inconsistent ones to match across browsers.
Note
β Fixes bugs in HTML elements
β Keeps accessibility & usability intact
π¦ CSS Reset vs Normalize β Quick Comparison
| Feature | CSS Reset | Normalize.css |
|---|---|---|
| Removes default styles? | β Yes (fully) | β No (keeps good defaults) |
| Fixes browser inconsistencies? | β Minimal | β Extensive |
| Better for UI frameworks? | β Yes | β Yes (more modern) |
| Good for typography? | β No, everything resets | β Yes, preserves base typography |
π§Ή 1. Classic CSS Reset Example
Classic Reset
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
}This is a simple reset commonly used in small projects.
π§Ή 2. Eric Meyerβs CSS Reset (Popular Reset)
Eric Meyer Reset
/* v2.0 | 20110126 */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 support */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body { line-height: 1; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
table { border-collapse: collapse; border-spacing: 0; }π οΈ 3. Normalize.css Example
Normalize.css fixes cross-browser inconsistencies and preserves useful defaults.
Note
Import Normalize.css
@import url('https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css');Instead of wiping all styles, it ensures elements like:
- Headings have consistent size inheritance
- Forms behave consistently across browsers
- Line-heights and font-size inheritance are predictable
- Links & buttons have modern default styling
π What Normalize.css Fixes
| Element | Fix |
|---|---|
| Buttons | Fixes inconsistent appearance |
| Links | Ensures no weird outlines or styles |
| Headings | Consistent font inheritance |
| Forms | Proper font-family inheritance |
| Sub/Sup | Vertical alignment fixes |
| Images | Removes border in IE |
π§ When Should You Use Reset vs Normalize?
Use a CSS Reset when:
- You're building a design system from scratch
- You want 100% control over every element
- You donβt want any browser defaults
Use Normalize.css when:
- You want predictable, cross-browser-safe defaults
- You want modern styling without wiping everything
- You want a good starting point for apps or dashboards
π Common Modern Reset + Normalize Hybrid
Many developers combine a **minimal reset** + **normalize-like rules**:
Modern Hybrid Reset
*, *::before, *::after {
box-sizing: border-box;
}
html {
line-height: 1.5;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
font-family: system-ui, sans-serif;
}
img, picture, video, canvas {
max-width: 100%;
display: block;
}
input, button, textarea, select {
font: inherit;
}Note
β οΈ Common Mistakes
- β Using a full reset when you actually need normalize (overkill)
- β Forgetting to include box-sizing: border-box
- β Resetting form styles you rely on
- β Not testing across browsers after applying resets
Note
π₯ Summary
CSS Reset clears everything β perfect for custom UI systems.Normalize.css fixes cross-browser issues β keeps helpful defaults. Both are essential tools for building consistent, predictable, and professional CSS.
Learn more βNormalize.css Official Page π