This reference guide provides a quick look at the most commonly used CSS properties, categorized by their function. Use this as a cheat sheet during your development process.
Properties that control the spacing and sizing of elements.
| Property | Description |
|---|---|
width / height |
Sets the width and height of an element. |
margin |
Sets the space outside the border of an element. |
padding |
Sets the space inside an element, between the content and the border. |
border |
Sets the width, style, and color of the boundary. |
box-sizing |
Defines how the total width and height of an element is calculated. |
Properties that style text and fonts.
| Property | Description |
|---|---|
color |
Sets the color of the text. |
font-family |
Specifies the font for an element. |
font-size |
Sets the size of the font. |
font-weight |
Sets the thickness of the font (e.g., bold). |
text-align |
Specifies the horizontal alignment of text. |
Properties for positioning and interactivity.
| Property | Description |
|---|---|
display |
Specifies the display behavior of an element (flex, grid, block). |
position |
Defines how an element is positioned (fixed, absolute, relative). |
z_index |
Sets the stack order of an element. |
cursor |
Specifies the type of cursor to be displayed. |