close
Skip to content

The CSS reference for developers and their agents.

CSS never stops changing. You decide how it should look, and agents like Claude Code, Codex and Cursor write it. css.dev shows you both what works today: live demos for you, Markdown for them.

Live demos

Change a value and watch the boxes move

Many reference pages open on a playground like this one: real CSS in a real page, with the code below it rewritten as you change the controls.

justify-content
align-items
flex-direction
12px
CSS
.container {  display: flex;  flex-direction: row;  justify-content: space-between;  align-items: center;  gap: 12px;}

Learn

From the first rule to cascade layers

63 guides in 7 tracks. Each one teaches a single idea, with demos you change as you read.

Reference

One page for each feature

Each page has the syntax, every value, worked examples, common mistakes and browser support.

New in CSS

What browsers have shipped lately

Features browsers added in the last few years, each with a page that says what it does and where it works.

Tailwind CSS

CSS and Tailwind side by side

Each property with Tailwind utilities has a Tailwind tab: its classes, the CSS each one compiles to (generated by Tailwind itself), and demos rebuilt with utilities where they translate.

CSS

.card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background-color: white;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
}

.card:hover {
  box-shadow: 0 10px 15px rgb(0 0 0 / 0.1);
}

Tailwind

<div
  class="flex items-center gap-4
         rounded-xl bg-white p-6
         shadow-sm hover:shadow-lg"
>
  …
</div>

FAQ

Questions

What the site is, what it costs and where its data comes from.

What is css.dev?

A CSS reference and a set of guides where every idea comes with a demo you can change. Each page covers one property, selector, function, at-rule or value: what it does, every value it takes, worked examples, the mistakes people make, and where it works.

Is css.dev free?

Yes. Every page, demo and guide is free to read, with no account.

I'm new to CSS. Where do I start?

Start with the Learn section. The Foundations track goes in order from what CSS is to the cascade, the box model and units, and each guide assumes only the ones before it. When a guide mentions a property, its name links to the reference page.

Where does the browser support data come from?

The support table and the Baseline status on each page are generated from MDN's browser-compat-data and the web-features project, the open data behind MDN's own compatibility tables and Baseline badges. A property's formal definition comes from MDN's data too. They are refreshed with the site, not written by hand.

How does the Tailwind part work?

Every CSS property that has utilities in Tailwind has a Tailwind tab: the classes, the exact CSS each one produces (compiled by Tailwind itself, not copied from a table), and the page's demos rebuilt with utilities where they translate. The Tailwind section also has guides to the ideas behind utilities, starting from the CSS.

Can my AI coding assistant read css.dev?

Yes. Every page is also plain Markdown at its address plus .md, and /llms.txt lists them all with one line each, so an assistant can read exactly what you would.

New to CSS: start with the first guide

The Foundations track begins at what CSS is and goes in order, each guide building on the ones before it.

  1. 1What CSS is
  2. 2CSS syntax
  3. 3Selecting elements