CSS quick reference
The properties you will use every day, on one page.
| Property | Purpose |
|---|---|
color | Text colour |
background | Background colour or image |
font-size / font-weight | Text size and thickness |
text-align | left, center, right |
line-height | Space between lines of text |
width / max-width | Element width and its upper limit |
padding / margin | Space inside and outside the border |
border / border-radius | Outline and rounded corners |
box-shadow | Soft shadow around a box |
display | block, inline, flex, grid, none |
position | static, relative, absolute, fixed, sticky |
z-index | Which positioned element sits on top |
overflow | What happens to content that does not fit |
opacity | See-through level, 0 to 1 |
transition | Animate between two states |
transform | Move, scale or rotate without affecting layout |
cursor | The pointer style, such as pointer |