CSS reference
Quick reference pages for CSS selectors, display, the box model, Flexbox, Grid, position, typography, text, color, backgrounds, borders, and sizing and overflow. These pages complement the CSS tutorial; they do not replace it.
Use the tutorial for a short guided path, then open a reference page when you need syntax, initial values, conditions, and boundaries. Examples are complete HTML and CSS fragments checked with a CSS parser for structure. They were not rendered in a browser for these pages.
| Topic | What it covers |
|---|---|
| Selectors | Quick reference for CSS selectors: common patterns, specificity, and the :is, :where, and :not rules, complementary to the CSS tutorial. |
| Display | Quick reference for CSS display: outer and inner display roles, common keywords, and how display: none differs from visibility. |
| Box model | Quick reference for the CSS box model: box-sizing calculations, padding, border, margin, and when vertical margins collapse. |
| Flexbox | Quick reference for CSS Flexbox: main and cross axes, default alignment, gap, and why flex items default to min-width: auto. |
| Grid | Quick reference for CSS Grid: track sizing, why 1fr is minmax(auto, 1fr), minmax(0, 1fr), and auto-fit versus auto-fill. |
| Position | Quick reference for CSS position: static, relative, absolute, sticky, and fixed, including sticky inset and overflow, and why absolute is not always relative to the parent. |
| Typography | Quick reference for CSS font families, font-size, line-height, the font shorthand, and the limits of font loading on this site. |
| Text | Quick reference for CSS text-align, wrapping, overflow-wrap versus word-break, and the conditions required for text-overflow. |
| Colors | Quick reference for CSS color syntax, alpha, currentColor, and how opacity differs from a transparent color and from hiding interaction. |
| Backgrounds | Quick reference for CSS background-color, layers, position, size, and using a gradient instead of a network image. |
| Borders | Quick reference for CSS borders, border-radius, and outline, including layout size and focus visibility. |
| Sizing and overflow | Quick reference for CSS width, height, min/max sizes, percentage heights and the containing block, and overflow including clip versus hidden. |