CSS Academy · Lesson

CSS Reset and Normalize

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

Lesson 4 of 413 steps

CSS Reset and Normalize is a free CSS Academy lesson on CoddyKit. This is 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, and your progress syncs across the web and the CoddyKit app. The CSS Academy course includes 4 lessons in total.

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.

<h1>Title</h1>
<p>Paragraph with reset margins.</p>
<ul><li>Item</li><li>Item</li></ul>
<ol><li>Step</li><li>Step</li></ol>

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:

<h1>Reset Demo</h1><h2>Sub</h2><h3>Sub</h3><h4>Sub</h4><h5>Sub</h5><h6>Sub</h6>
<p>Body text with smooth font rendering.</p>
<picture><img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='120'><rect width='300' height='120' fill='%234f8fdb'/></svg>" alt="demo" /></picture>
<video controls></video>
<canvas></canvas>
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40"><circle cx="20" cy="20" r="18" fill="tomato"/></svg>

Images as Block

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

<img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='160'><rect width='400' height='160' fill='%23ff6347'/></svg>" alt="block image" />

List Reset Pattern

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

<ul class="nav-list"><li>Home</li><li>Shop</li><li>About</li></ul>

Form Elements Reset

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

<input type="text" placeholder="Name" />
<button>Submit</button>
<textarea placeholder="Message"></textarea>
<select><option>Choice A</option></select>

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.

<p>Base font-size and line-height set on the root element affect the whole page.</p>

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.

Free to start

Learn CSS with an AI tutor — free

Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.

Courses
40
Lessons
159

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. 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. The CSS Academy course includes 4 lessons in total.

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, so you can start here or from the beginning and move at your own pace. This is lesson 4 of 4.

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