CSS properties
A CSS property is a parameter used in a CSS declaration that lets you style certain aspects of selected elements.
For example, the opacity property is used to set the opacity of a selected element, allowing you to control if content behind that element is visible:
/* Set 0.8 opacity on <img> elements */
img {
opacity: 0.8;
}
Each property has a name (e.g., opacity), a value (e.g., 0.8), and a defined behavior on the rendering of the document.
CSS also defines shorthand properties, so you can specify multiple related properties in a single declaration.
For example, the margin property is a shorthand for margin-top, margin-right, margin-bottom, and margin-left, setting the margin of all four sides of an element:
/* Give <img> elements 1rem of margin */
img {
margin: 1rem;
}
Syntax
selector {
property: value;
}
Alphabetical index of properties
Standard properties defined by CSS specifications include the following:
Misc
A
accent-coloralign-contentalign-itemsalign-selfalignment-baselineall(shorthand)anchor-nameanimation-compositionanimation-delayanimation-directionanimation-durationanimation-fill-modeanimation-iteration-countanimation-nameanimation-play-stateanimation-range-endanimation-range-startanimation-range(shorthand)animation-timelineanimation-timing-functionanimation(shorthand)appearanceaspect-ratio
B
Border-*
border-block-colorborder-block-end-colorborder-block-end-styleborder-block-end-widthborder-block-end(shorthand)border-block-start-colorborder-block-start-styleborder-block-start-widthborder-block-start(shorthand)border-block-styleborder-block-widthborder-block(shorthand)border-bottom-colorborder-bottom-left-radiusborder-bottom-right-radiusborder-bottom-styleborder-bottom-widthborder-bottom(shorthand)border-collapseborder-color(shorthand)border-end-end-radiusborder-end-start-radiusborder-image-outsetborder-image-repeatborder-image-sliceborder-image-sourceborder-image-widthborder-image(shorthand)border-inline-colorborder-inline-end-colorborder-inline-end-styleborder-inline-end-widthborder-inline-end(shorthand)border-inline-start-colorborder-inline-start-styleborder-inline-start-widthborder-inline-start(shorthand)border-inline-styleborder-inline-widthborder-inline(shorthand)border-left-colorborder-left-styleborder-left-widthborder-left(shorthand)border-radius(shorthand)border-right-colorborder-right-styleborder-right-widthborder-right(shorthand)border-spacingborder-start-end-radiusborder-start-start-radiusborder-style(shorthand)border-top-colorborder-top-left-radiusborder-top-right-radiusborder-top-styleborder-top-widthborder-top(shorthand)border-width(shorthand)border(shorthand)
B - C
bottombox-alignbox-decoration-breakbox-directionbox-flex-groupbox-flexbox-linesbox-ordinal-groupbox-orientbox-packbox-shadowbox-sizingbreak-afterbreak-beforebreak-insidecaption-sidecaret-colorclearclip-pathclip-ruleclipcolor-interpolation-filterscolor-interpolationcolor-schemecolorcolumn-countcolumn-fillcolumn-gapcolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-rule(shorthand)column-spancolumn-widthcolumns(shorthand)contain-intrinsic-block-sizecontain-intrinsic-heightcontain-intrinsic-inline-sizecontain-intrinsic-size(shorthand)contain-intrinsic-widthcontaincontainer-namecontainer-typecontainer(shorthand)content-visibilitycontentcounter-incrementcounter-resetcounter-setcursorcxcy
D - F
ddirectiondisplaydominant-baselineempty-cellsfield-sizingfill-opacityfill-rulefillfilterflex-basisflex-directionflex-flow(shorthand)flex-growflex-shrinkflex-wrapflex(shorthand)floatflood-colorflood-opacityfont-familyfont-feature-settingsfont-kerningfont-language-overridefont-optical-sizingfont-palettefont-size-adjustfont-sizefont-smoothfont-stretchfont-stylefont-synthesis-positionfont-synthesis-small-capsfont-synthesis-stylefont-synthesis-weightfont-synthesis(shorthand)font-variant-alternatesfont-variant-capsfont-variant-east-asianfont-variant-emojifont-variant-ligaturesfont-variant-numericfont-variant-positionfont-variant(shorthand)font-variation-settingsfont-weightfont(shorthand)forced-color-adjust
G - I
gap(shorthand)grid-area(shorthand)grid-auto-columnsgrid-auto-flowgrid-auto-rowsgrid-column-endgrid-column-startgrid-column(shorthand)grid-row-endgrid-row-startgrid-row(shorthand)grid-template-areasgrid-template-columnsgrid-template-rowsgrid-template(shorthand)grid(shorthand)hanging-punctuationheighthyphenate-characterhyphenate-limit-charshyphensimage-orientationimage-renderingimage-resolutioninitial-letterinline-sizeinset-block-endinset-block-startinset-block(shorthand)inset-block(shorthand)inset-inline-endinset-inline-startinset-inline(shorthand)inset-inline(shorthand)inset(shorthand)inset(shorthand)interpolate-sizeisolation
J - M
justify-contentjustify-itemsjustify-selfleftletter-spacinglighting-colorline-breakline-clampline-height-stepline-heightlist-style-imagelist-style-positionlist-style-typelist-style(shorthand)list-style(shorthand)margin-block-endmargin-block-startmargin-block(shorthand)margin-bottommargin-inline-endmargin-inline-startmargin-inline(shorthand)margin-leftmargin-rightmargin-topmargin-trimmargin(shorthand)marker-endmarker-midmarker-startmarkermask-border-modemask-border-outsetmask-border-repeatmask-border-slicemask-border-sourcemask-border-widthmask-border(shorthand)mask-clipmask-compositemask-imagemask-modemask-originmask-positionmask-repeatmask-sizemask-typemask(shorthand)math-depthmath-shiftmath-stylemax-block-sizemax-heightmax-inline-sizemax-widthmin-block-sizemin-heightmin-inline-sizemin-widthmix-blend-mode
O - P
object-fitobject-positionoffset-anchoroffset-distanceoffset-pathoffset-positionoffset-rotateoffset(shorthand)opacityorderorphansoutline-coloroutline-offsetoutline-styleoutline-widthoutline(shorthand)overflow-anchoroverflow-blockoverflow-clip-marginoverflow-inlineoverflow-wrapoverflow-xoverflow-yoverflow(shorthand)overlayoverscroll-behavior-blockoverscroll-behavior-inlineoverscroll-behavior-xoverscroll-behavior-yoverscroll-behavior(shorthand)padding-block-endpadding-block-startpadding-block(shorthand)padding-bottompadding-inline-endpadding-inline-startpadding-inline(shorthand)padding-leftpadding-rightpadding-toppadding(shorthand)page-break-afterpage-break-beforepage-break-insidepagepaint-orderperspective-originperspectiveplace-content(shorthand)place-items(shorthand)place-self(shorthand)pointer-eventsposition-anchorposition-areaposition-try-fallbacksposition-try-orderposition-try(shorthand)position-visibilitypositionprint-color-adjust
Q - S
quotesrreading-flowreading-orderresizerightrotaterow-gapruby-alignruby-positionrxryscalescroll-behaviorscroll-margin-block-endscroll-margin-block-startscroll-margin-block(shorthand)scroll-margin-bottomscroll-margin-inline-endscroll-margin-inline-startscroll-margin-inline(shorthand)scroll-margin-leftscroll-margin-rightscroll-margin-topscroll-margin(shorthand)scroll-marker-groupscroll-padding-block-endscroll-padding-block-startscroll-padding-block(shorthand)scroll-padding-bottomscroll-padding-inline-endscroll-padding-inline-startscroll-padding-inline(shorthand)scroll-padding-leftscroll-padding-rightscroll-padding-topscroll-padding(shorthand)scroll-snap-alignscroll-snap-stopscroll-snap-typescroll-timeline-axisscroll-timeline-namescroll-timeline(shorthand)scrollbar-colorscrollbar-gutterscrollbar-widthshape-image-thresholdshape-marginshape-outsideshape-renderingspeak-asstop-colorstop-opacitystroke-dasharraystroke-dashoffsetstroke-linecapstroke-linejoinstroke-miterlimitstroke-opacitystroke-widthstroke
T - Z
tab-sizetable-layouttext-align-lasttext-aligntext-anchortext-box-edgetext-box-trimtext-box(shorthand)text-combine-uprighttext-decoration-colortext-decoration-linetext-decoration-skip-inktext-decoration-skiptext-decoration-styletext-decoration-thicknesstext-decoration(shorthand)text-emphasis-colortext-emphasis-positiontext-emphasis-styletext-emphasis(shorthand)text-indenttext-justifytext-orientationtext-overflowtext-renderingtext-shadowtext-size-adjusttext-spacing-trimtext-transformtext-underline-offsettext-underline-positiontext-wrap-modetext-wrap-styletext-wrap(shorthand)timeline-scopetoptouch-actiontransform-boxtransform-origintransform-styletransformtransition-behaviortransition-delaytransition-durationtransition-propertytransition-timing-functiontransition(shorthand)translateunicode-bidiuser-modifyuser-selectvector-effectvertical-alignview-timeline-axisview-timeline-insetview-timeline-nameview-timeline(shorthand)view-transition-classview-transition-namevisibilitywhite-space-collapsewhite-spacewidowswidthwill-changeword-breakword-spacingwriting-modexyz-indexzoom
Non-standard properties
Non-standard, or vendor-prefixed properties include the following:
-moz- prefix
-webkit- prefix
-webkit-box-reflect-webkit-border-before(shorthand)-webkit-mask-box-image(shorthand)-webkit-mask-composite-webkit-mask-position-x-webkit-mask-position-y-webkit-mask-repeat-x-webkit-mask-repeat-y-webkit-tap-highlight-color-webkit-text-fill-color-webkit-text-security-webkit-text-stroke(shorthand)-webkit-text-stroke-color-webkit-text-stroke-width-webkit-touch-callout
Specifications
| Specification |
|---|
| CSS Syntax Module Level 3> |
| CSS Snapshot 2024> |
| CSS Cascading and Inheritance Level 6> |