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:

css
/* Set 0.8 opacity on <img> elements with an "inactive" class */
img.inactive {
  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 padding property is a shorthand for padding-top, padding-right, padding-bottom, and padding-left, setting the padding of all four sides of an element:

css
/* Give <img> elements 1rem of padding */
img {
  padding: 1rem;
}

Syntax

css
selector {
  property: value;
}

Alphabetical index of properties

Standard properties defined by CSS specifications include the following:

Misc

A

B

Border-*

Bot - C

D - F

G - I

J - M

O - P

Q - S

T - Z

Non-standard properties

Specifications

Specification
CSS Syntax Module Level 3
CSS Snapshot 2024
CSS Cascading and Inheritance Level 6

See also