What CSS Is: Styling Documents, Standards, Browsers and Baseline
What CSS does and why it's separate from HTML, how browsers turn HTML and CSS into pixels, how CSS is standardized in levels and modules instead of versions, the three browser engines, and how to tell whether a feature is safe to use with Baseline and compatibility data.
kvi5hnuCode Sprout team member11 min readOn this page
CSS (Cascading Style Sheets) is the language that controls how web documents look: colors, fonts, spacing, layout, animation, and how all of these adapt to different screens. HTML says what the content is, such as a heading, a list of books or a form, and CSS says how it should be presented. This first article explains what that separation buys you, what a browser does with your CSS, how the language is developed, and how to decide whether a new feature is ready to use.
Content and presentation
Here is a fragment of HTML with no CSS of its own. The browser still shows it in a readable way, because every browser has default styles: headings are large and bold, lists have bullets, and links are blue and underlined.
<h1>Harbor Books</h1>
<p>An independent bookshop by the water. Open every day except Sunday.</p>
<h2>This week</h2>
<ul>
<li><a href="#">Poetry reading, Thursday 19:00</a></li>
<li><a href="#">Children's story hour, Saturday 10:00</a></li>
</ul>
Now the same HTML with a short stylesheet. Nothing in the markup changed:
body {
font-family: system-ui, sans-serif;
max-width: 34rem;
margin: 1rem auto;
color: #2b2b2b;
}
h1 {
font-family: Georgia, serif;
color: #8a3b12;
border-bottom: 3px solid #f4c95d;
padding-bottom: 0.25rem;
}
h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
ul { list-style: none; padding: 0; }
li a {
display: block;
padding: 0.5rem 0.75rem;
margin-bottom: 0.25rem;
background: #f4efe6;
color: inherit;
text-decoration: none;
border-radius: 6px;
}

Not one character of HTML differs between the three panels. Everything that changes, from fonts and colors to how the list looks, comes from the stylesheet.
Keeping presentation out of the HTML has practical benefits:
- One stylesheet can style a whole site. Change the brand color once, and every page follows.
- The same content can look different in different contexts: on a phone, on a wide screen, when printed, in dark mode, or with the user's own preferences, such as larger text or reduced motion.
- The HTML stays meaningful. Screen readers, search engines and reader modes rely on the structure of the document, not on how it looks.
- Users keep control. Browsers let people override styles, for example with minimum font sizes or high-contrast modes, which works best when the page's styles are in CSS.
The "cascading" in Cascading Style Sheets
Several stylesheets usually apply to the same page: the browser's defaults, your site's stylesheets, and sometimes the user's own settings. Within your own CSS, many rules can target the same element, too. The cascade is the algorithm that decides which value wins when declarations conflict, based on where they come from, their importance, layers, how specific their selectors are and their order. Part 3 covers it in detail. It's the most important idea in CSS, and the source of most surprises.
What the browser does with your CSS
When a browser loads a page, it parses the HTML into a tree of elements, the DOM, and the CSS into the CSSOM, its own representation of the rules. Then it produces the picture in stages:

- Style: for every element, the browser finds the matching rules, runs the cascade, and works out a computed value for every property, including inherited ones (article 16).
- Layout: it turns elements into boxes and calculates their sizes and positions, following the layout mode of each container: normal flow, flexbox, grid, tables or positioning.
- Paint: it draws the boxes' backgrounds, borders, text and images, usually into several layers.
- Composite: it combines the layers into the frame you see, which the GPU can do very quickly.
The pipeline runs again whenever something changes: the window is resized, a class is added, the user hovers over a link, or an animation advances. Which stages repeat depends on the property that changed, which is why animating transform is cheaper than animating width (article 111).
How CSS is developed: levels and modules
CSS is standardized by the CSS Working Group at the W3C, which includes browser makers, other companies and invited experts. The language was first proposed in 1994. CSS level 1 became a recommendation in 1996, and CSS 2 in 1998. CSS 2 was revised as CSS 2.1, which was finished in 2011 and is still the core of how normal flow, floats and positioning are defined.
After CSS 2.1, the language was split into modules, each developed at its own pace and numbered with its own levels: Selectors Level 4, Color Level 5, Cascading and Inheritance Level 6, CSS Grid Layout Level 2, and dozens more. A new level adds to the previous one without breaking it.
That means there is no "CSS3" or "CSS4" as a version of the language. "CSS3" was a popular name for the first wave of modules after 2.1, such as rounded corners, gradients and media queries, and you'll still see it in older articles. Today it's simply CSS, and features arrive continuously. The Working Group publishes a yearly snapshot that lists which modules are stable.
A specification moves through stages such as Working Draft, Candidate Recommendation and Recommendation. For a working developer, the stage matters less than whether browsers have shipped the feature: many features are used everywhere long before their module becomes a Recommendation.
Browsers and engines
What matters in practice is the rendering engine, the part of a browser that implements HTML and CSS. There are three in wide use:
| Engine | Browsers |
|---|---|
| Blink | Chrome, Edge, Opera, Samsung Internet, Brave, Vivaldi and most other browsers |
| Gecko | Firefox |
| WebKit | Safari, on macOS and iOS. On iOS, other browsers have used WebKit too, because Apple required it outside the EU and, since December 2025, Japan |
All three are evergreen: they update automatically every few weeks, so most users have a recent version. Chrome and Firefox release a new version about every four weeks, and Safari ships features in a few larger releases each year.
Engines implement features at different times, so a feature can work in one browser and not yet in another. Since 2021 (first as "Compat 2021"), the engine makers have run a yearly Interop project, in which they agree on a list of features and test suites to make consistent across browsers. Interop 2026 includes anchor positioning, container style queries, scroll-driven animations, view transitions and contrast-color(), among others.
Is it safe to use? Baseline
Two questions decide whether you can use a feature: do the browsers your users have support it, and what happens in the ones that don't? For the first, Baseline gives a simple answer. It's a status, maintained by browser makers and shown on MDN, Can I Use and many other sites, that says when a feature works in all the core browsers: Chrome, Edge, Firefox and Safari, on desktop and mobile.
| Status | Meaning |
|---|---|
| Limited availability | not yet supported in at least one core browser |
| Baseline: newly available | supported in the latest version of every core browser. The date it reached this status is its Baseline year, as in "Baseline 2024" |
| Baseline: widely available | 30 months after becoming newly available, so it works in almost every browser your users have |
A widely available feature is safe for nearly any project. A newly available one is usually fine if you also have a fallback for older browsers, or if a missing feature just looks a bit plainer (article 6). A limited one needs a fallback, or should wait. Each article in this course says what's Baseline and what isn't, in its What's current section.
For more detail, use compatibility tables: the table at the bottom of every MDN reference page, or Can I Use, which shows support by browser version and the share of users with it. The webstatus.dev site tracks the Baseline status of every feature.
What CSS can do today
CSS now covers much more than colors and fonts. Without JavaScript, you can:
- Lay out pages and components with flexbox and grid, including subgrid and, in some browsers, masonry-style layouts.
- Adapt to their context with media queries, which respond to the viewport and user preferences, and container queries, which respond to the size of the component's container.
- Select elements by what they contain with
:has(). - Organize large codebases with cascade layers, nesting and
@scope. - Work with color precisely in wide-gamut spaces such as OKLCH, mix colors with
color-mix(), and support light and dark themes withlight-dark(). - Animate with transitions, keyframes, scroll-driven animations and view transitions between pages.
- Position elements relative to others with anchor positioning, for tooltips and menus.
All of these are covered in this course, with notes on which browsers support each one.
Common questions
Is CSS a programming language?
It's a declarative language: you describe the result, and the browser works out how to produce it. It has variables (custom properties), functions such as calc(), min() and clamp(), conditions with @media, @supports, @container and the newer if(), and it can even express some logic with selectors such as :has(). Whether you call that programming matters less than learning to think in rules, conditions and the cascade.
What's the difference between CSS3 and CSS? There isn't one. "CSS3" is an informal name for the modules developed after CSS 2.1. CSS is developed as separate modules with their own level numbers, and there will never be a single "CSS4" release.
Do I need to learn Sass or a framework such as Tailwind before CSS? No. Both generate CSS, so you need CSS to use them well and to debug what they produce. Native CSS now has variables, nesting and layers, which covers much of what preprocessors were originally for (article 120).
How do I know if a CSS feature works in Safari or Firefox? Check the Baseline status and compatibility table on the feature's MDN page, or Can I Use. Test in the real browsers too, or with a service that provides them, because bugs and partial implementations aren't always in the tables.
Why does the same page look slightly different in different browsers? Each browser has its own default stylesheet, form control designs and font rendering, and newer features may be missing or behave slightly differently. Most of these differences disappear once you set your own styles for things like margins, fonts and form controls. Some, such as font rendering, are by design and not worth fighting.
Summary
- CSS describes how HTML content is presented, which keeps content meaningful and lets one stylesheet style many pages in many contexts.
- The cascade decides which declarations win when several apply to the same element.
- Browsers compute styles, lay out boxes, paint them and composite layers. Which stages repeat after a change depends on which properties changed.
- CSS is developed as modules with levels, not versions. "CSS3" was only an informal name.
- Blink, Gecko and WebKit are the three engines, all updated continuously, and the Interop project aligns their behavior.
- Baseline says whether a feature works in all core browsers: limited, newly available, or widely available 30 months later.
- Check MDN or Can I Use for details, and plan a fallback for features that aren't widely available.
Practice questions
A colleague says a feature is "part of CSS4, so it isn't supported yet". What's wrong with that reasoning, and how should you decide whether to use the feature?
Answer
There is no CSS4: features belong to modules with their own levels, and support depends on whether browsers have shipped them, not on a version number. Check the feature's Baseline status and compatibility table. If it's widely available, use it. If it's newly available or limited, decide whether a fallback is needed for browsers without it.
A feature became Baseline newly available in January 2025. When does it become widely available?
Answer
In July 2027, 30 months after it became newly available.
Which stages of the rendering pipeline does the browser repeat when a hover rule changes a link's background-color? What about when it changes the link's padding?
Answer
A background color change affects only how the box is drawn, so the browser restyles the element, then repaints and composites, without redoing layout. Padding changes the box's size, which can move other boxes, so layout runs again too, followed by paint and composite.
Why is it useful that the HTML in the first two examples is identical?
Answer
It shows the separation of content and presentation: the same document can be restyled, adapted to other devices or printed without touching its markup, and its structure stays meaningful for screen readers, search engines and other tools.
Previous: CSS Course Outline: From Selectors to Modern Layout and Motion
Next: Adding CSS to a Page: link, style, @import and Inline Styles

More in CSS Course
Quiz: CSS Delicate Details
Twenty-five questions on the edge cases that surprise experienced developers: invalid custom properties, shorthands that reset values, layer order with !important, containing blocks, margin collapsing, specificity of :is() and :where(), intrinsic minimum sizes, and more, each checked in Chrome.
Quiz: CSS Interview Questions
Thirty front-end interview questions: cascade, specificity and layers, box model and margin collapsing, stacking contexts, positioning, flexbox and grid, responsive design, custom properties, performance, accessibility, modern selectors and architecture.
Quiz: CSS Course Final Exam
Thirty questions across the whole CSS course: syntax and error handling, selectors, the cascade and layers, values and units, color, the box model, backgrounds, positioning, flexbox, grid, responsive design, typography, generated content, effects, transforms, motion and architecture.
Quiz: CSS Architecture, Tooling and Debugging (CSS Part 17)
Twenty questions on modular CSS and BEM, layering a stylesheet, design tokens and theming, pattern libraries and safe refactoring, preprocessors and build tools, the at-rules reference, and debugging common CSS problems.
Discussion
Sign in to ask a question or share what you learned.