Skip to main content

CSS Normalize 2025

Keep useful browser defaults. Fix the inconsistencies.
Modern normalize.css for 2025.

Complete Normalize

/* Modern CSS Normalize 2025 */

/*
  1. Use a more intuitive box model
*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

/*
  2. Root defaults
*/
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark light;
  hanging-punctuation: first last;
}

/*
  3. Body defaults
*/
body {
  margin: 0;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/*
  4. Main element consistency
*/
main {
  display: block;
}

/*
  5. Heading sizes
*/
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

/*
  6. Grouping content
*/
hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1em;
}

/*
  7. Text-level semantics
*/
abbr[title] {
  text-decoration: underline dotted;
}

b,
strong {
  font-weight: bolder;
}

code,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
  8. Links
*/
a {
  color: inherit;
  text-decoration: inherit;
}

/*
  9. Media
*/
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/*
  10. Forms
*/
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button,
select {
  text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  appearance: button;
}

::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

:-moz-focusring {
  outline: 1px dotted ButtonText;
}

:-moz-ui-invalid {
  box-shadow: none;
}

legend {
  padding: 0;
}

progress {
  vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

[type="search"] {
  -webkit-appearance: textfield;
  appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

/*
  11. Interactive
*/
summary {
  display: list-item;
}

/*
  12. Text overflow
*/
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/*
  13. Tables
*/
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/*
  14. Stacking context for frameworks
*/
#root,
#__next {
  isolation: isolate;
}

Normalize vs Reset: Which Should You Use?

CSS Normalize (This Page)

Keeps useful defaults like heading sizes, form element styles, and list markers. Fixes cross-browser inconsistencies without removing everything.

Best for: Most projects

CSS Reset

Removes all browser styles. Everything starts from zero. You define all typography, spacing, and element styles yourself.

Best for: Custom design systems

View CSS Reset 2025 →

What's Included

1. Box Model

Intuitive box sizing for all elements

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

Fixes: Makes padding and border included in element's total width/height.

2. Root Defaults

Consistent root element behavior

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark light;
  hanging-punctuation: first last;
}

Fixes: Fixes line height in all browsers, prevents font size adjustment on orientation change.

3. Body Defaults

Remove margin and set min height

body {
  margin: 0;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

Fixes: Removes inconsistent body margin, enables smooth font rendering.

4. Typography

Consistent heading, code, and text styles

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1em;
}

Fixes: Normalizes heading sizes and uses modern monospace font stack.

5. Media Elements

Responsive images and media

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

Fixes: Makes media elements responsive and removes inline gaps.

6. Forms

Consistent form element styling

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

Fixes: Form elements inherit fonts and have consistent line-height across browsers.

7. Links

Reset link styles

a {
  color: inherit;
  text-decoration: inherit;
}

Fixes: Links inherit color and have no underline by default. Style them as needed.

8. Tables

Collapse table borders

table {
  border-collapse: collapse;
  border-spacing: 0;
}

Fixes: Removes default table spacing for cleaner table styling.

Updates for 2025

This normalize is based on normalize.css but updated for modern browsers:

  • +100svh for proper mobile viewport height
  • +color-scheme for dark mode support
  • +hanging-punctuation for better typography
  • +Modern monospace font stack with ui-monospace
  • +Framework-ready stacking context for #root and #__next
  • -Removed IE 10/11 fixes (no longer needed)
  • -Removed legacy Edge fixes (now Chromium-based)

How to Use

Option 1: Import as a file

@import 'normalize.css';

Option 2: Paste at the beginning of your CSS

Copy the normalize code and paste it at the very top of your main stylesheet.

Note: Tailwind CSS

Tailwind's Preflight is a reset, not a normalize. If you want normalize behavior with Tailwind, disable Preflight and use this instead.

Browser Support

Tested and works with all modern browsers:

Chrome
88+
Firefox
78+
Safari
15.4+
Edge
88+