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;
}selector {
property: value;
}Standard properties defined by CSS specifications include the following:
accent-coloralign-contentalign-itemsalign-selfalignment-baselineall (shorthand)anchor-nameanchor-scopeanimation-compositionanimation-delayanimation-directionanimation-durationanimation-fill-modeanimation-iteration-countanimation-nameanimation-play-stateanimation-range-endanimation-range-startanimation-range (shorthand)animation-timelineanimation-timing-functionanimation (shorthand)appearanceaspect-ratiobackdrop-filterbackface-visibilitybackground-attachmentbackground-blend-modebackground-clipbackground-colorbackground-imagebackground-originbackground-position-xbackground-position-ybackground-positionbackground-repeat (shorthand)background-repeat-xbackground-repeat-ybackground-sizebackground (shorthand)baseline-shiftbaseline-sourceblock-sizeborder-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)bottombox-alignbox-decoration-breakbox-directionbox-flex-groupbox-flexbox-linesbox-ordinal-groupbox-orientbox-packbox-shadowbox-sizingbreak-afterbreak-beforebreak-insidecaption-sidecaret-animationcaret-colorcaret-shapecaret (shorthand)clearclip-pathclip-ruleclipcolor-interpolation-filterscolor-interpolationcolor-schemecolorcolumn-countcolumn-fillcolumn-gapcolumn-heightcolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-rule (shorthand)column-spancolumn-widthcolumn-wrapcolumns (shorthand)contain-intrinsic-block-sizecontain-intrinsic-heightcontain-intrinsic-inline-sizecontain-intrinsic-size (shorthand)contain-intrinsic-widthcontaincontainer-namecontainer-typecontainer (shorthand)content-visibilitycontentcorner-block-end-shapecorner-block-start-shapecorner-bottom-left-shapecorner-bottom-right-shapecorner-bottom-shape (shorthand)corner-end-end-shapecorner-end-start-shapecorner-inline-end-shapecorner-inline-start-shapecorner-left-shape (shorthand)corner-right-shape (shorthand)corner-shape (shorthand)corner-start-end-shapecorner-start-start-shapecorner-top-left-shapecorner-top-right-shapecorner-top-shape (shorthand)counter-incrementcounter-resetcounter-setcursorcxcyddirectiondisplaydominant-baselinedynamic-range-limitempty-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-widthfont (shorthand)forced-color-adjustgap (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)interactivityinterest-delayinterest-delay-endinterest-delay-startinterpolate-sizeisolationjustify-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-modeobject-fitobject-positionobject-view-boxoffset-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-orderpath-lengthperspective-originperspectiveplace-content (shorthand)place-items (shorthand)place-self (shorthand)pointer-eventsposition-anchorposition-areaposition-try-fallbacksposition-try-orderposition-try (shorthand)position-visibilitypositionprint-color-adjustquotesrreading-flowreading-orderresizerightrotaterow-gapruby-alignruby-overhangruby-positionrxryscalescroll-behaviorscroll-initial-targetscroll-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-target-groupscroll-timeline-axisscroll-timeline-namescroll-timeline (shorthand)scrollbar-colorscrollbar-gutterscrollbar-widthshape-image-thresholdshape-marginshape-outsideshape-renderingspeak-asstop-colorstop-opacitystroke-dasharraystroke-dashoffsetstroke-linecapstroke-linejoinstroke-miterlimitstroke-opacitystroke-widthstroketab-sizetable-layouttext-align-lasttext-aligntext-anchortext-autospacetext-box-edgetext-box-trimtext-box (shorthand)text-combine-uprighttext-decoration-colortext-decoration-insettext-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-align (shorthand)view-timeline-axisview-timeline-insetview-timeline-nameview-timeline (shorthand)view-transition-classview-transition-namevisibilitywhite-space-collapsewhite-spacewidowswidthwill-changeword-breakword-spacingwriting-modexyz-indexzoomNon-standard vendor-prefixed properties include:
-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