CSS rule

A selector followed by a block of declarations, such as p { color: red; }, that applies those property values to every matching element.

In more detail

Each declaration is a property and a value. When rules conflict, the cascade compares origin, layer, specificity and source order to choose one value per property.

Related terms

Taught in

References