0Pricing
CSS Academy · Lesson

CSS Reset and Normalize

Remove inconsistent browser default styles with CSS resets and normalize stylesheets.

CSS Reset and Normalize is a free CSS Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the CSS Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

The Problem: Inconsistent Browser Defaults

Every browser has a built-in user-agent stylesheet with default styles for headings, margins, paddings, lists, and form elements. These defaults differ across browsers, causing inconsistent appearances.

CSS Reset

A CSS reset removes all browser defaults, giving you a blank slate. The famous Eric Meyer reset sets margin, padding, and many properties to zero or none.

/* Eric Meyer Reset (simplified) */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul, ol {
  list-style: none;
}

CSS Normalize

Normalize.css takes a different approach: instead of removing all defaults, it makes browser defaults consistent and fixes known bugs while preserving useful defaults like heading sizes.

Reset vs Normalize Trade-offs

Comparison:

  • Reset: blank slate, you define everything, more work
  • Normalize: consistent baseline with useful defaults retained, less custom code

Modern CSS Reset

A popular modern reset (by Josh Comeau) targets the most impactful defaults:

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

Images as Block

Making images display: block removes the default inline gap (caused by line-height) at the bottom of images inside containers:

img {
  display: block;
  max-width: 100%;
}

List Reset Pattern

Remove list markers and indentation when styling custom navigation or UI lists:

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

Form Elements Reset

Form elements (input, button, textarea) don't inherit font by default in many browsers. A common fix:

input, button, textarea, select {
  font: inherit;
}

Tailwind's Preflight

Tailwind CSS includes its own reset called Preflight, built on top of modern-normalize. If you use Tailwind, you already have a reset applied automatically.

Where to Place Reset

Always place your reset/normalize stylesheet first, before any component or utility styles. Cascade order ensures your styles override the reset without specificity conflicts.

Custom Reset Considerations

Build your own minimal reset tailored to your project rather than including a full third-party reset. Include only the rules you need to keep CSS payload small.

:root {
  font-size: 16px;
  line-height: 1.5;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

Quick Check

What is the key difference between a CSS reset and CSS normalize?

Recap

Browser default styles are inconsistent. CSS resets remove all defaults; normalize.css makes them consistent. Modern resets focus on the most impactful rules like box-sizing: border-box, max-width images, and inherited fonts for form elements. Always load the reset first.

Frequently asked questions

Is the “CSS Reset and Normalize” lesson free?

Yes — the full text of “CSS Reset and Normalize” is free to read here on the web, and the CSS Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the CSS Academy course, upgrade to CoddyKit PRO.

What will I learn in “CSS Reset and Normalize”?

Remove inconsistent browser default styles with CSS resets and normalize stylesheets. You practise CSS Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start CSS Academy?

No prior experience is required. CSS Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “CSS Reset and Normalize” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this CSS Academy lesson?

Yes. Every CSS Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Block vs Inline vs Inline-Block
  2. Visibility vs Display None
  3. Overflow: Scroll Clip and Auto
  4. CSS Reset and Normalize
← Back to CSS Academy