CSS Properties
Browse all CSS properties with syntax, examples, and practical developer notes.
25 properties
align-items
Aligns flex items along the cross axis.
background-color
Sets the background color of an element.
border-radius
Rounds the corners of an element's border.
box-sizing
Controls whether padding and border are included in an element's total width and height.
color
Sets the foreground color of an element's text and text decorations.
cursor
Sets the mouse cursor appearance when hovering over an element.
display
Sets how an element participates in layout, including block, inline, flex, grid, or none.
flex-direction
Sets the direction of the main axis in a flex container.
font-size
Sets the size of the font for an element.
font-weight
Sets the weight (boldness) of the font.
gap
Sets the spacing between rows and columns in flex and grid containers.
grid-template-columns
Defines the column track sizes in a grid container.
height
Sets the height of an element's content area.
justify-content
Aligns flex or grid items along the main axis.
line-height
Sets the height of a line box, controlling the space between lines of text.
margin
Sets the space outside an element's border, separating it from neighboring elements.
max-width
Sets the maximum width an element can grow to.
opacity
Sets the transparency level of an element and all its children.
overflow
Controls what happens when content overflows its container.
padding
Sets the space between an element's content and its border.
position
Defines how an element is positioned and how it interacts with normal document flow (static, relative, absolute, fixed, sticky).
transform
Applies 2D or 3D transformations like rotation, scaling, or translation to an element.
transition
Animates property changes smoothly over a specified duration.
width
Sets the width of an element's content area.
z-index
Controls the stacking order of positioned elements.