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-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-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-animationcaret-colorcaret-shapecaret(shorthand)clearclip-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-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-setcursorcxcy