A reference of 154 CSS properties
What each property does, the values people actually use, and whether it is inherited — one line each.
Layout11
Properties that decide what kind of box an element is and what happens when it overflows.
Flexbox and grid24
Properties that line elements up and seat them in a grid — most layout today is one of these two.
Box and spacing16
Size and spacing. Outer margins collapse into each other; inner padding is painted by the background.
Text25
Typeface, line spacing, alignment — how the text reads. Most of these are inherited.
Colour and background13
Text colour, background colour, gradients and transparency.
Borders13
Borders, corners and shadows. An outline takes up no space of its own.
Effects7
Effects applied after everything is painted — blurring, clipping, filling.
Transform and motion14
Moving, rotating and easing. These leave the layout untouched, so nothing else jumps.
Positioning7
Lifting an element out of the flow and placing it; z-index decides what sits in front.
Tables4
Properties for table borders and column widths.
Lists4
The shape and placement of list markers.
Interaction9
How the element answers the mouse, the finger and the scroll.
Print and misc7
The rest — printing, generated content and automatic numbering.
How to read this
- An inherited property only needs writing once on the parent — every child picks it up. Most text properties work this way.
- A shorthand resets whatever you leave out. Writing background: red alone also wipes a background image you set earlier.
- When rules collide, the more specific selector wins; only when specificity ties does source order decide.
- Animate transform and opacity for smoothness. Changing width or top forces the layout to be recalculated.
Frequently asked questions
Q. How many CSS properties are there?
The standard lists well over 500, but only a fraction come up in daily work. This reference covers the 154 you end up writing again and again, grouped by purpose.
Q. What does inherited mean?
It means the value passes down: set it on the parent and children use it without repeating it. Most text-related properties inherit; spacing and borders do not.
Q. What changes when I use a shorthand?
You set several values in one line, but anything you leave out resets to its default. That is why background: red on its own also wipes a background image you had set.
Q. If the same property is set twice, which wins?
Specificity is checked first: an id beats a class, a class beats a tag. Only when specificity ties does the later rule win. !important overrides all of that, which is why it is best avoided.
Q. Should I use px or rem?
A rem is a multiple of the root font size, so it grows when the reader enlarges text in the browser. Use rem for type and spacing; px is fine where a value must never change, such as a hairline border.