Back to tools
CSS Properties Reference
Complete reference for CSS properties — click any property name to copy it. 153 properties documented.
153 of 153
PropertyCategorySyntax / ValuesInitialInherited
Defines how an element is rendered in the document flow.
Layout
Defines how an element is rendered in the document flow.
block | inline | flex | grid | none | contents | …inlineNo
Sets how an element is positioned in the document.
Layout
Sets how an element is positioned in the document.
static | relative | absolute | fixed | stickystaticNo
Vertical offset from the top edge for positioned elements.
Layout
Vertical offset from the top edge for positioned elements.
<length> | <percentage> | autoautoNo
Horizontal offset from the right edge for positioned elements.
Layout
Horizontal offset from the right edge for positioned elements.
<length> | <percentage> | autoautoNo
Vertical offset from the bottom edge for positioned elements.
Layout
Vertical offset from the bottom edge for positioned elements.
<length> | <percentage> | autoautoNo
Horizontal offset from the left edge for positioned elements.
Layout
Horizontal offset from the left edge for positioned elements.
<length> | <percentage> | autoautoNo
Floats an element to the left or right, letting content wrap around it.
Layout
Floats an element to the left or right, letting content wrap around it.
left | right | none | inline-start | inline-endnoneNo
Specifies whether an element can be next to floated elements.
Layout
Specifies whether an element can be next to floated elements.
none | left | right | both | inline-start | inline-endnoneNo
Stacking order of a positioned element. Higher values appear in front.
Layout
Stacking order of a positioned element. Higher values appear in front.
auto | <integer>autoNo
Controls how content that overflows the box is handled.
Layout
Controls how content that overflows the box is handled.
visible | hidden | clip | scroll | autovisibleNo
Controls horizontal overflow handling.
Layout
Controls horizontal overflow handling.
visible | hidden | clip | scroll | autovisibleNo
Controls vertical overflow handling.
Layout
Controls vertical overflow handling.
visible | hidden | clip | scroll | autovisibleNo
Shows or hides an element without changing layout (unlike display:none).
Layout
Shows or hides an element without changing layout (unlike display:none).
visible | hidden | collapsevisibleYes
Clips an element to a shape — circle, polygon, inset, SVG path, etc.
Layout
Clips an element to a shape — circle, polygon, inset, SVG path, etc.
none | <clip-source> | <basic-shape>noneNo
Sets a preferred aspect ratio for the element (e.g. 16/9).
Layout
Sets a preferred aspect ratio for the element (e.g. 16/9).
auto | <ratio>autoNo
Shorthand for column-count and column-width in multi-column layout.
Layout
Shorthand for column-count and column-width in multi-column layout.
auto | <column-width> <column-count>autoNo
Number of columns in a multi-column layout.
Layout
Number of columns in a multi-column layout.
auto | <integer>autoNo
Gap between columns (also used in flex/grid).
Layout
Gap between columns (also used in flex/grid).
normal | <length> | <percentage>normalNo
Sets the direction of flex items along the main axis.
Flexbox
Sets the direction of flex items along the main axis.
row | row-reverse | column | column-reverserowNo
Controls whether flex items wrap onto multiple lines.
Flexbox
Controls whether flex items wrap onto multiple lines.
nowrap | wrap | wrap-reversenowrapNo
Shorthand for flex-direction and flex-wrap.
Flexbox
Shorthand for flex-direction and flex-wrap.
<flex-direction> || <flex-wrap>row nowrapNo
Aligns flex items along the main axis.
Flexbox
Aligns flex items along the main axis.
flex-start | flex-end | center | space-between | space-around | space-evenlyflex-startNo
Aligns flex items along the cross axis.
Flexbox
Aligns flex items along the cross axis.
stretch | flex-start | flex-end | center | baselinestretchNo
Aligns flex lines when there is extra space on the cross axis.
Flexbox
Aligns flex lines when there is extra space on the cross axis.
flex-start | flex-end | center | space-between | space-around | stretchstretchNo
Overrides align-items for a single flex item.
Flexbox
Overrides align-items for a single flex item.
auto | stretch | flex-start | flex-end | center | baselineautoNo
Shorthand for flex-grow, flex-shrink, and flex-basis.
Flexbox
Shorthand for flex-grow, flex-shrink, and flex-basis.
none | <flex-grow> <flex-shrink> <flex-basis>0 1 autoNo
How much a flex item grows relative to others.
Flexbox
How much a flex item grows relative to others.
<number>0No
How much a flex item shrinks relative to others.
Flexbox
How much a flex item shrinks relative to others.
<number>1No
The initial size of a flex item before flex-grow/shrink is applied.
Flexbox
The initial size of a flex item before flex-grow/shrink is applied.
content | <width>autoNo
Controls the order of flex (or grid) items. Lower values appear first.
Flexbox
Controls the order of flex (or grid) items. Lower values appear first.
<integer>0No
Shorthand for row-gap and column-gap in flex and grid containers.
Flexbox
Shorthand for row-gap and column-gap in flex and grid containers.
<row-gap> <column-gap>0No
Space between flex rows or grid rows.
Flexbox
Space between flex rows or grid rows.
normal | <length> | <percentage>normalNo
Defines the columns of a grid container with track sizes.
Grid
Defines the columns of a grid container with track sizes.
none | <track-list> | subgridnoneNo
Defines the rows of a grid container with track sizes.
Grid
Defines the rows of a grid container with track sizes.
none | <track-list> | subgridnoneNo
Defines named grid areas using quoted strings of cell names.
Grid
Defines named grid areas using quoted strings of cell names.
none | <string>+noneNo
Shorthand for grid-template-rows, -columns, and -areas.
Grid
Shorthand for grid-template-rows, -columns, and -areas.
none | <grid-template-rows> / <grid-template-columns>noneNo
Size of implicitly created grid columns.
Grid
Size of implicitly created grid columns.
auto | <track-size>autoNo
Size of implicitly created grid rows.
Grid
Size of implicitly created grid rows.
auto | <track-size>autoNo
Controls how auto-placed items fill the grid.
Grid
Controls how auto-placed items fill the grid.
row | column | dense | row dense | column denserowNo
Shorthand for grid-column-start and grid-column-end.
Grid
Shorthand for grid-column-start and grid-column-end.
<grid-line> / <grid-line>autoNo
Shorthand for grid-row-start and grid-row-end.
Grid
Shorthand for grid-row-start and grid-row-end.
<grid-line> / <grid-line>autoNo
Start position of an item on the column axis.
Grid
Start position of an item on the column axis.
auto | <custom-ident> | <integer>autoNo
End position of an item on the column axis.
Grid
End position of an item on the column axis.
auto | <custom-ident> | <integer>autoNo
Start position of an item on the row axis.
Grid
Start position of an item on the row axis.
auto | <custom-ident> | <integer>autoNo
End position of an item on the row axis.
Grid
End position of an item on the row axis.
auto | <custom-ident> | <integer>autoNo
Shorthand for row/column start and end, or named area placement.
Grid
Shorthand for row/column start and end, or named area placement.
<grid-line> / <grid-line> / <grid-line> / <grid-line>autoNo
Shorthand for align-items and justify-items in a grid container.
Grid
Shorthand for align-items and justify-items in a grid container.
<align-items> <justify-items>normal stretchNo
Shorthand for align-content and justify-content.
Grid
Shorthand for align-content and justify-content.
<align-content> <justify-content>normalNo
Shorthand for align-self and justify-self on a grid item.
Grid
Shorthand for align-self and justify-self on a grid item.
<align-self> <justify-self>autoNo
Width of the element's content area.
Box Model
Width of the element's content area.
auto | <length> | <percentage> | min-content | max-content | fit-contentautoNo
Height of the element's content area.
Box Model
Height of the element's content area.
auto | <length> | <percentage> | min-content | max-content | fit-contentautoNo
Minimum width — the element cannot be narrower than this.
Box Model
Minimum width — the element cannot be narrower than this.
auto | <length> | <percentage>autoNo
Maximum width — the element cannot be wider than this.
Box Model
Maximum width — the element cannot be wider than this.
none | <length> | <percentage>noneNo
Minimum height — the element cannot be shorter than this.
Box Model
Minimum height — the element cannot be shorter than this.
auto | <length> | <percentage>autoNo
Maximum height — the element cannot be taller than this.
Box Model
Maximum height — the element cannot be taller than this.
none | <length> | <percentage>noneNo
Shorthand for all four margins outside the border.
Box Model
Shorthand for all four margins outside the border.
<length> | <percentage> | auto (1–4 values)0No
Margin on the top side of the element.
Box Model
Margin on the top side of the element.
<length> | <percentage> | auto0No
Margin on the right side of the element.
Box Model
Margin on the right side of the element.
<length> | <percentage> | auto0No
Margin on the bottom side of the element.
Box Model
Margin on the bottom side of the element.
<length> | <percentage> | auto0No
Margin on the left side of the element.
Box Model
Margin on the left side of the element.
<length> | <percentage> | auto0No
Shorthand for all four paddings inside the border.
Box Model
Shorthand for all four paddings inside the border.
<length> | <percentage> (1–4 values)0No
Padding on the top side of the element.
Box Model
Padding on the top side of the element.
<length> | <percentage>0No
Padding on the right side of the element.
Box Model
Padding on the right side of the element.
<length> | <percentage>0No
Padding on the bottom side of the element.
Box Model
Padding on the bottom side of the element.
<length> | <percentage>0No
Padding on the left side of the element.
Box Model
Padding on the left side of the element.
<length> | <percentage>0No
Shorthand for border-width, border-style, and border-color.
Box Model
Shorthand for border-width, border-style, and border-color.
<border-width> <border-style> <color>medium noneNo
Width of the border on all four sides.
Box Model
Width of the border on all four sides.
thin | medium | thick | <length> (1–4 values)mediumNo
Style of the border on all four sides.
Box Model
Style of the border on all four sides.
solid | dashed | dotted | double | groove | ridge | none (1–4 values)noneNo
Color of the border on all four sides.
Box Model
Color of the border on all four sides.
<color> (1–4 values)currentcolorNo
Rounds the corners of the border box.
Box Model
Rounds the corners of the border box.
<length> | <percentage> (1–4 corners)0No
Shorthand for top border width, style, and color.
Box Model
Shorthand for top border width, style, and color.
<border-width> <border-style> <color>medium noneNo
Defines whether width/height includes padding and border.
Box Model
Defines whether width/height includes padding and border.
content-box | border-boxcontent-boxNo
Shorthand for outline-width, style, and color. Does not affect layout.
Box Model
Shorthand for outline-width, style, and color. Does not affect layout.
<outline-width> <outline-style> <color>medium noneNo
Space between the outline and the border edge.
Box Model
Space between the outline and the border edge.
<length>0No
Adds one or more shadow effects to the element's box.
Box Model
Adds one or more shadow effects to the element's box.
none | <inset> <x> <y> <blur> <spread> <color>noneNo
Prioritized list of font families for the element's text.
Typography
Prioritized list of font families for the element's text.
<family-name> | <generic-family>browser defaultYes
Size of the font.
Typography
Size of the font.
<absolute-size> | <relative-size> | <length> | <percentage>mediumYes
Weight (boldness) of the font.
Typography
Weight (boldness) of the font.
normal | bold | bolder | lighter | 100–900normalYes
Whether text is displayed normally, italicized, or oblique.
Typography
Whether text is displayed normally, italicized, or oblique.
normal | italic | obliquenormalYes
Enables small-caps and other font variations.
Typography
Enables small-caps and other font variations.
normal | small-capsnormalYes
Shorthand for font-style, -variant, -weight, -size, line-height, -family.
Typography
Shorthand for font-style, -variant, -weight, -size, line-height, -family.
<font-style> <font-variant> <font-weight> <font-size>/<line-height> <font-family>—Yes
Height of a line box. Use unitless values to avoid inheritance issues.
Typography
Height of a line box. Use unitless values to avoid inheritance issues.
normal | <number> | <length> | <percentage>normalYes
Spacing between characters (tracking).
Typography
Spacing between characters (tracking).
normal | <length>normalYes
Spacing between words.
Typography
Spacing between words.
normal | <length>normalYes
Horizontal alignment of inline content within a block.
Typography
Horizontal alignment of inline content within a block.
left | right | center | justify | start | endstartYes
Controls text capitalization.
Typography
Controls text capitalization.
none | capitalize | uppercase | lowercasenoneYes
Shorthand for text-decoration-line, -style, -color, -thickness.
Typography
Shorthand for text-decoration-line, -style, -color, -thickness.
none | underline | overline | line-through | <color> <style>noneNo
Indentation of the first line of a block of text.
Typography
Indentation of the first line of a block of text.
<length> | <percentage>0Yes
How overflowed text is signaled. Use with overflow: hidden and white-space: nowrap.
Typography
How overflowed text is signaled. Use with overflow: hidden and white-space: nowrap.
clip | ellipsisclipNo
Shadow effects applied to text.
Typography
Shadow effects applied to text.
none | <offset-x> <offset-y> <blur> <color>noneYes
How whitespace inside an element is handled.
Typography
How whitespace inside an element is handled.
normal | nowrap | pre | pre-wrap | pre-line | break-spacesnormalYes
Whether line breaks occur at normal word boundaries or anywhere.
Typography
Whether line breaks occur at normal word boundaries or anywhere.
normal | break-all | keep-all | break-wordnormalYes
Whether the browser may break within an unbreakable string.
Typography
Whether the browser may break within an unbreakable string.
normal | break-word | anywherenormalYes
Vertical alignment of an inline or table-cell element.
Typography
Vertical alignment of an inline or table-cell element.
baseline | top | middle | bottom | <length> | <percentage>baselineNo
Text direction — left-to-right or right-to-left.
Typography
Text direction — left-to-right or right-to-left.
ltr | rtlltrYes
Foreground color of the element's text and decorations.
Color
Foreground color of the element's text and decorations.
<color>canvastextYes
Shorthand for all background properties.
Color
Shorthand for all background properties.
<bg-color> <bg-image> <bg-position> / <bg-size> <bg-repeat> …transparentNo
Background color of the element.
Color
Background color of the element.
<color>transparentNo
Background image(s) of the element.
Color
Background image(s) of the element.
none | <image> | <gradient>noneNo
Size of background image(s).
Color
Size of background image(s).
auto | cover | contain | <length> <length>autoNo
Starting position of each background image.
Color
Starting position of each background image.
top | center | bottom | left | right | <length> | <percentage>0% 0%No
How background images are repeated.
Color
How background images are repeated.
repeat | repeat-x | repeat-y | no-repeat | space | roundrepeatNo
Area within which the background is painted.
Color
Area within which the background is painted.
border-box | padding-box | content-box | textborder-boxNo
Background positioning area.
Color
Background positioning area.
padding-box | border-box | content-boxpadding-boxNo
Whether background scrolls with the viewport or is fixed.
Color
Whether background scrolls with the viewport or is fixed.
scroll | fixed | localscrollNo
Transparency level of the element and all its children.
Color
Transparency level of the element and all its children.
<number 0–1>1No
How an element's content blends with the parent's content.
Color
How an element's content blends with the parent's content.
normal | multiply | screen | overlay | darken | lighten | …normalNo
Accent color for UI controls like checkboxes and radio buttons.
Color
Accent color for UI controls like checkboxes and radio buttons.
auto | <color>autoYes
Applies 2D or 3D transformations (translate, rotate, scale, skew).
Transform
Applies 2D or 3D transformations (translate, rotate, scale, skew).
none | <transform-function>+noneNo
Origin point for transformations.
Transform
Origin point for transformations.
<position>50% 50% 0No
Whether children are positioned in 3D space.
Transform
Whether children are positioned in 3D space.
flat | preserve-3dflatNo
Distance from the user to the z=0 plane — enables 3D perspective.
Transform
Distance from the user to the z=0 plane — enables 3D perspective.
none | <length>noneNo
Vanishing point of the perspective property.
Transform
Vanishing point of the perspective property.
<position>50% 50%No
Whether the back face of an element is visible when turned toward the viewer.
Transform
Whether the back face of an element is visible when turned toward the viewer.
visible | hiddenvisibleNo
Individual translate transform — independent of transform property.
Transform
Individual translate transform — independent of transform property.
none | <length-percentage>{1,2} <length>?noneNo
Individual rotate transform — independent of transform property.
Transform
Individual rotate transform — independent of transform property.
none | <angle> | <axis-3d> <angle>noneNo
Individual scale transform — independent of transform property.
Transform
Individual scale transform — independent of transform property.
none | <number>{1,3}noneNo
Shorthand for all animation properties.
Animation
Shorthand for all animation properties.
<name> <duration> <easing> <delay> <iteration> <direction> <fill-mode>none 0s ease 0s 1 normal noneNo
Name of the @keyframes rule describing the animation.
Animation
Name of the @keyframes rule describing the animation.
none | <keyframes-name>noneNo
Duration of one animation cycle.
Animation
Duration of one animation cycle.
<time>0sNo
Timing function governing the animation's acceleration curve.
Animation
Timing function governing the animation's acceleration curve.
ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier() | steps()easeNo
Delay before the animation starts.
Animation
Delay before the animation starts.
<time>0sNo
Number of times the animation plays.
Animation
Number of times the animation plays.
infinite | <number>1No
Whether the animation plays forward, backward, or alternates.
Animation
Whether the animation plays forward, backward, or alternates.
normal | reverse | alternate | alternate-reversenormalNo
How the animation applies styles before and after it runs.
Animation
How the animation applies styles before and after it runs.
none | forwards | backwards | bothnoneNo
Whether the animation is running or paused.
Animation
Whether the animation is running or paused.
running | pausedrunningNo
Shorthand for all transition properties.
Animation
Shorthand for all transition properties.
<property> <duration> <easing> <delay>all 0s ease 0sNo
CSS properties to which transitions are applied.
Animation
CSS properties to which transitions are applied.
none | all | <custom-ident>allNo
Duration of the transition.
Animation
Duration of the transition.
<time>0sNo
Timing function for the transition.
Animation
Timing function for the transition.
ease | linear | ease-in | ease-out | cubic-bezier() | steps()easeNo
Delay before the transition starts.
Animation
Delay before the transition starts.
<time>0sNo
Applies graphical effects like blur, brightness, or color shifts.
Filter
Applies graphical effects like blur, brightness, or color shifts.
none | blur() | brightness() | contrast() | drop-shadow() | grayscale() | hue-rotate() | invert() | opacity() | saturate() | sepia()noneNo
Applies filter effects to the area behind the element.
Filter
Applies filter effects to the area behind the element.
none | blur() | brightness() | contrast() | …noneNo
Creates a new stacking context — useful with mix-blend-mode.
Filter
Creates a new stacking context — useful with mix-blend-mode.
auto | isolateautoNo
Mouse cursor to display when hovering the element.
Misc
Mouse cursor to display when hovering the element.
auto | default | pointer | text | move | grab | not-allowed | …autoYes
Whether an element can be the target of pointer events.
Misc
Whether an element can be the target of pointer events.
auto | none | visiblePainted | …autoYes
Controls whether the user can select text.
Misc
Controls whether the user can select text.
auto | none | text | all | containautoNo
Whether an element is resizable by the user.
Misc
Whether an element is resizable by the user.
none | both | horizontal | vertical | block | inlinenoneNo
Generated content for ::before and ::after pseudo-elements.
Misc
Generated content for ::before and ::after pseudo-elements.
normal | none | <string> | attr() | url() | counter() | …normalNo
Shorthand for list-style-type, -position, and -image.
Misc
Shorthand for list-style-type, -position, and -image.
<list-style-type> <list-style-position> <list-style-image>disc outsideYes
Type of list marker for list items.
Misc
Type of list marker for list items.
disc | circle | square | decimal | none | <string>discYes
Algorithm for table and cell layout. fixed is faster for large tables.
Misc
Algorithm for table and cell layout. fixed is faster for large tables.
auto | fixedautoNo
Whether adjacent table cell borders are collapsed or separated.
Misc
Whether adjacent table cell borders are collapsed or separated.
collapse | separateseparateYes
Space between cells when border-collapse: separate.
Misc
Space between cells when border-collapse: separate.
<length> <length>?0Yes
Position of a table caption.
Misc
Position of a table caption.
top | bottomtopYes
Whether borders are shown for empty table cells.
Misc
Whether borders are shown for empty table cells.
show | hideshowYes
How a replaced element (img, video) fits its container.
Misc
How a replaced element (img, video) fits its container.
fill | contain | cover | none | scale-downfillNo
Alignment of replaced element within its box.
Misc
Alignment of replaced element within its box.
<position>50% 50%No
Hints to the browser that an element will change, enabling GPU compositing.
Misc
Hints to the browser that an element will change, enabling GPU compositing.
auto | <animateable-feature>autoNo
Controls the native appearance of UI controls.
Misc
Controls the native appearance of UI controls.
none | auto | <compat-auto>autoNo
Scroll behavior when navigating to an anchor link.
Misc
Scroll behavior when navigating to an anchor link.
auto | smoothautoNo
Snap behavior of a scroll container.
Misc
Snap behavior of a scroll container.
none | x | y | block | inline | both [mandatory | proximity]noneNo
Alignment of scroll snap targets within the snap container.
Misc
Alignment of scroll snap targets within the snap container.
none | start | end | centernoneNo
Inherited: Yes — children inherit this value unless overridden.— click any property name to copy it