CSS Baseline: The Good, The Bad, and The Ugly
Web Development
Introduction
Each browser ships with its own stylesheet that defines how HTML elements look before you write a single line of CSS. These user agent stylesheets differ between browsers, creating cross-browser inconsistencies that can turn simple projects into debugging nightmares.
This guide explores the three main approaches to establishing a CSS baseline--CSS resets, normalize.css, and modern CSS resets--examining when each approach shines and where they fall short. Whether you're building a simple landing page or a complex web application, understanding these baseline strategies will give you consistent, predictable styling from the start.
For professional web development services that implement these best practices, learn more about our web development services.
The Problem with Browser Defaults
Understanding why browser styles vary
Why Browser Styles Vary
When Tim Berners-Lee created the first web browser, he recognized that unstyled HTML needed to be readable. Browsers ship with built-in stylesheets--called user agent stylesheets--that provide default formatting for every HTML element. These defaults include font sizes, margins, padding, line heights, and more. The intention was good: a raw HTML document should be legible without any CSS as explained by GeeksforGeeks.
However, the specifications for these defaults were never strictly mandated, leading to significant variations between browsers. Chrome might render headings with a different font weight than Safari. Firefox could apply different default margins to paragraphs than Edge. Form elements are particularly problematic--buttons, inputs, and textareas often look dramatically different across browsers.
For developers seeking pixel-perfect consistency, these variations pose a real challenge that requires a solid CSS foundation from the start. Understanding modern CSS techniques alongside your baseline strategy creates a powerful combination for consistent web experiences.
The Impact on Development
Browser inconsistencies affect development in several ways. First, there's the debugging time spent tracking down why a design looks slightly different in another browser. Second, testing becomes more complex--you must verify designs across multiple browsers rather than trusting consistent behavior. Third, user experience suffers when the same interface looks polished in one browser but broken in another as discussed by Josh W. Comeau.
The solution? Establish a consistent baseline. This means either removing all browser defaults (reset), normalizing them to a consistent state (normalize), or applying a targeted set of corrections (modern reset). Each approach has its place, and understanding the trade-offs helps you choose the right strategy for your project.
Our approach to frontend development always starts with establishing a proper CSS baseline to avoid these issues. For projects that also need to rank well in search engines, pairing a solid CSS foundation with our SEO services ensures both performance and visibility.
CSS Reset: The Nuclear Option
Full control at a cost
What Is a CSS Reset?
A CSS reset is exactly what it sounds like: a stylesheet that resets all browser defaults to a consistent baseline. The most famous example is Eric Meyer's Reset CSS, which systematically removes margins, paddings, and other default stylings from virtually every HTML element. The philosophy is simple: if all browsers start from the same blank slate, you'll have full control over every visual aspect of your design as defined by GeeksforGeeks.
1/* Traditional Reset Example */2html, body, div, span, applet, object, iframe,3h1, h2, h3, h4, h5, h6, p, blockquote, pre,4a, abbr, acronym, address, big, cite, code,5del, dfn, em, img, ins, kbd, q, s, samp,6small, strike, strong, sub, sup, tt, var,7b, u, i, center,8dl, dt, dd, ol, ul, li,9fieldset, form, label, legend,10table, caption, tbody, tfoot, thead, tr, th, td,11article, aside, canvas, details, embed,12figure, figcaption, footer, header, hgroup,13menu, nav, output, ruby, section, summary,14time, mark, audio, video {15 margin: 0;16 padding: 0;17 border: 0;18 font-size: 100%;19 font: inherit;20 vertical-align: baseline;21}Complete Control
You decide every margin, padding, and font size--no hidden defaults interfere with your styles
Predictable Styling
Nothing comes from the browser unexpectedly--everything originates from your CSS
Layout Consistency
Box models are consistent once you apply your own styles, simplifying layout calculations
Design System Fit
Valuable for strict design systems requiring absolute visual control
The Bad: Reinventing the Wheel
The major drawback of traditional resets is that they remove useful defaults. Browsers apply italics to <em>, bold to <strong>, and indentation to <blockquote> for good reason--these semantic HTML elements carry meaning. A reset strips all this away, forcing you to redefine every style you need as noted by GeeksforGeeks.
This means more CSS to write, more maintenance overhead, and more opportunities for errors. Additionally, traditional resets can create long selector chains and override cascades. When you're fighting the reset to restore styles you actually wanted, specificity battles can make CSS harder to maintain.
The Ugly: Maintenance Burden
Perhaps the ugliest aspect of traditional resets is their maintenance burden. As browsers evolve and HTML elements change, your reset may need updates. New semantic elements like <article>, <section>, or <aside> need to be added. Browser updates might change defaults in ways that affect your reset. The initial time saved by using a reset can be lost to ongoing maintenance as explained by Josh W. Comeau.
Modern developers have largely moved away from aggressive resets for these reasons. The web platform has matured, and browser inconsistencies are less severe than they once were. Most projects benefit from a lighter-touch approach that focuses on modern CSS techniques.
Normalize.css: The Balanced Approach
Consistency without losing defaults
Philosophy of Normalization
Normalize.css takes a fundamentally different approach from traditional resets. Rather than removing all defaults, it makes browsers render elements consistently while preserving useful defaults. It targets only the specific styles that need normalization--fixing bugs, removing inconsistencies, and ensuring cross-browser compatibility where it matters as explained by the Normalize.css project.
1/* Examples from normalize.css */2html {3 font-family: sans-serif;4 -webkit-text-size-adjust: 100%;5 -ms-text-size-adjust: 100%;6}7 8body {9 margin: 0;10}11 12article,13aside,14details,15figcaption,16figure,17footer,18header,19hgroup,20main,21menu,22nav,23section,24summary {25 display: block;26}Preserves Defaults
Keeps useful defaults like italics for <em> and bold for <strong> elements
Compact Size
Relatively small file (~400 lines) addressing only real cross-browser problems
Active Maintenance
Focus on actual inconsistencies, with regular updates for new browser versions
Proven Adoption
Used by major projects including Twitter, GitHub, Bootstrap, and HTML5 Boilerplate
The Bad: Less Control
The trade-off for normalization is less absolute control. Some browser defaults still exist in the normalized output, which means you may occasionally encounter styling conflicts. If you want complete control over every visual aspect, normalize.css might feel like it's getting in your way. You still need to write CSS to override any defaults you don't want.
Additionally, normalize.css can't solve every cross-browser issue. Some inconsistencies require project-specific solutions. Understanding what normalize.css does (and doesn't do) is important--you can't simply drop it in and expect perfect consistency without understanding its limitations as documented by Normalize.css.
Browser Support and Adoption
One of normalize.css's greatest strengths is its widespread adoption and careful maintenance. It's used by major websites and projects including Twitter, GitHub, Medium, Bootstrap, and HTML5 Boilerplate. This adoption means the library is thoroughly tested across browsers and constantly improved.
Browser support: Chrome, Edge, Firefox ESR+, IE 10+, Safari 8+, and Opera. This broad compatibility makes it an excellent choice for projects that need to support older browsers while maintaining modern development practices as documented by the Normalize.css project.
Modern CSS Reset: The Best of Both Worlds
Evolution of baseline styling for 2025
Evolution of the Reset
Modern CSS resets represent an evolution in thinking about baselines. Rather than aggressive resets or pure normalization, these approaches combine insights from both methods. They address real problems while being mindful of what's actually needed in contemporary web development. With CSS features like logical properties and new layout systems, old reset approaches feel outdated as described by Josh W. Comeau.
Modern resets focus on the most impactful rules: fixing box-sizing, setting accessible line heights, handling text rendering, and addressing specific browser quirks. They use modern CSS features like logical properties (margin-block-end instead of margin-bottom) for better internationalization support as demonstrated by Piccalilli.
Key Modern Reset Rules
The most widely-cited modern reset comes from Josh W. Comeau and includes ten essential rules that cover modern CSS best practices. These rules address real-world issues while being concise and maintainable.
1/* Modern CSS Reset - 10 Essential Rules */2 3/* 1. Box-sizing Model */4*, *::before, *::after {5 box-sizing: border-box;6}7 8/* 2. Remove Default Margin */9*:not(dialog) {10 margin: 0;11}12 13/* 3. Enable Keyword Animations */14@media (prefers-reduced-motion: no-preference) {15 html {16 interpolate-size: allow-keywords;17 }18}19 20/* 4. Accessible Line Height */21body {22 line-height: 1.5;23}24 25/* 5. Improved Text Rendering */26body {27 -webkit-font-smoothing: antialiased;28}1/* Rules 6-10 */2 3/* 6. Better Media Defaults */4img, picture, video, canvas, svg {5 display: block;6 max-width: 100%;7}8 9/* 7. Inherit Fonts for Forms */10input, button, textarea, select {11 font: inherit;12}13 14/* 8. Prevent Text Overflows */15p, h1, h2, h3, h4, h5, h6 {16 overflow-wrap: break-word;17}18 19/* 9. Balanced Text Wrapping */20h1, h2, h3, h4 {21 text-wrap: balance;22}23 24/* 10. Root Stacking Context */25:root {26 isolation: isolate;27}1/* Andy Bell's Modern Reset */2html {3 -moz-text-size-adjust: none;4 -webkit-text-size-adjust: none;5 text-size-adjust: none;6}7 8body, h1, h2, h3, h4, p,9figure, blockquote, dl, dd {10 margin-block-end: 0;11}12 13ul[role='list'],14ol[role='list'] {15 list-style: none;16}17 18body {19 min-height: 100vh;20 line-height: 1.5;21}22 23h1, h2, h3, h4,24button, input, label {25 line-height: 1.1;26}27 28a:not([class]) {29 text-decoration-skip-ink: auto;30 color: currentColor;31}32 33img,34picture {35 max-width: 100%;36 display: block;37}38 39:target {40 scroll-margin-block: 5ex;41}Performance Considerations
Impact on page load and bundle size
Does CSS Baseline Impact Performance?
A common concern is whether baseline styles affect page performance. The good news is that modern CSS baseline approaches are generally lightweight and don't significantly impact page load times. Normalize.css is approximately 6KB minified. Modern resets are often even smaller--a few hundred bytes to a couple of kilobytes as noted by Josh W. Comeau.
The box-sizing: border-box rule on all elements has been debated for performance, but modern browsers handle it efficiently. It's widely recommended as the default approach for most projects. Any minor performance cost is far outweighed by the development speed and consistency benefits.
For projects built with our Next.js development services, we implement optimized CSS baselines that contribute to excellent Core Web Vitals scores. Pairing this with our AI automation services creates websites that are both performant and intelligent.
Bundle Size Impact
For most projects, the baseline CSS file is a tiny fraction of the total bundle size. Modern CSS bundling tools (like those in Next.js, Vite, or webpack) can inline critical baseline styles or load them synchronously without blocking rendering significantly. The baseline should be one of the first CSS files loaded, ensuring consistent styling is applied quickly.
This minimal footprint is one reason why modern CSS resets have become the preferred choice for performance-conscious developers building contemporary web applications. Building scalable React component libraries on top of a solid CSS foundation ensures maintainable code for years to come.
Choosing the Right Approach
When to use each method
When to Use CSS Reset
Traditional CSS resets are rarely the best choice for modern projects. They're best suited for projects requiring absolute control over every visual aspect, such as design systems with very specific style guides, or when integrating with legacy codebases that have their own comprehensive styling. Even in these cases, consider whether a lighter approach would work as recommended by GeeksforGeeks.
For most new projects, we recommend starting with a modern reset and customizing from there rather than using a traditional reset approach.
When to Use Normalize.css
Normalize.css remains an excellent choice for projects that want consistent cross-browser rendering without starting from scratch. It's particularly well-suited for:
- Projects using Bootstrap or other frameworks that have their own reset built in
- Legacy browser support requirements (IE10+)
- Teams who want a battle-tested solution maintained by the community
- Projects where preserving semantic HTML defaults is valuable
It's a solid, well-tested choice that has proven its worth in production environments for years as documented by the Normalize.css project.
When to Use Modern CSS Reset
Modern CSS resets are the recommended approach for most new projects. They work well with:
- New projects starting from scratch that need a clean foundation
- Teams using modern CSS features and practices like CSS-in-JS or CSS modules
- Projects prioritizing development speed and maintainability
- Any site built with contemporary frameworks like Next.js or React
The rules are transparent and easy to understand, making them simple to customize for project-specific needs. This flexibility, combined with their small size, makes modern resets ideal for most web development work as recommended by Josh W. Comeau.
Learn more about our custom web development approach that incorporates these modern best practices.
Best Practices for Implementation
Getting the most from your CSS baseline
Order Matters
CSS baseline styles should always be loaded before your project's custom CSS. This ensures the baseline is applied first and your styles can build upon it:
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="styles.css">
Customize as Needed
Neither a reset nor normalize.css is a one-size-fits-all solution. Both should be customized for your project's needs. If you need a particular default that a reset removes, add it back. If normalize.css changes something you want to preserve, override it. These are starting points, not rigid requirements.
Keep Updated
Browser inconsistencies evolve as browsers update. Normalize.css and modern resets are actively maintained projects. Keep your baseline styles updated to benefit from bug fixes and new browser compatibility improvements. Subscribe to release notes or use a package manager to receive updates automatically.
Code Examples: Side-by-Side Comparison
Visualizing the differences between approaches
1/* Without any baseline - browser defaults vary */2/* Each browser applies different margins, fonts, styles */3 4/* With CSS Reset - everything looks identical */5h1, p, button {6 margin: 0;7 font-family: inherit;8 font-size: inherit;9}10/* You must style EVERYTHING from scratch */11 12/* With Normalize.css - consistent but preserves defaults */13h1 {14 font-size: 2em;15 font-weight: 700;16 margin-block: 0.67em 0;17}18/* <h1> stays bold and larger than paragraphs */19 20/* With Modern CSS Reset - targeted improvements */21* { box-sizing: border-box; }22body { line-height: 1.5; }23h1, h2, h3, h4 { text-wrap: balance; }24img { max-width: 100%; display: block; }25/* Best of both worlds approach */Frequently Asked Questions
Conclusion
The CSS baseline you choose sets the foundation for your entire project. Traditional CSS resets offer absolute control but at the cost of maintenance and lost useful defaults. Normalize.css provides consistent cross-browser rendering while preserving semantic defaults, making it a solid, well-tested choice. Modern CSS resets represent the current best practice--lean, targeted rules that address real problems while working well with contemporary CSS features.
For most modern web development projects, a modern CSS reset like those from Josh W. Comeau or Andy Bell provides the best balance of consistency, maintainability, and development speed. Start with a proven reset, customize it for your needs, and keep it updated as browser capabilities evolve. Your future self (and your teammates) will thank you for the consistent, predictable styling foundation.
The "good, bad, and ugly" of CSS baselines isn't about finding a perfect solution--it's about understanding trade-offs and choosing the right tool for your project. Whether you go with a modern reset, normalize.css, or a custom approach, establishing a consistent baseline is essential for professional web development.
For projects requiring expert implementation of these CSS best practices, our web development team can help ensure your foundation is solid from the start.
Sources
- GeeksforGeeks: Difference between reset vs normalize CSS - Comprehensive comparison of CSS reset vs normalize approaches with code examples
- Josh W. Comeau: A Modern CSS Reset - Modern, updated approach to CSS resets for 2024-2025 with 10 detailed rules
- Piccalilli: A (More) Modern CSS Reset - Updated reset from Andy Bell with modern CSS features and logical properties
- Normalize.css Official - The original normalize.css project documentation