Css Rule

Css Rule

CSS ruleset.jpg Photo credit: Elijah Manor on Twitter

A CSS rule consists of a selector and a declaration block. We use the selector to select one or more HTML elements that we want to style. Then in the declaration block is where we write the actual styles in order to style elements on our page. To do so we can write one or more CSS declarations in each declaration block. Each declaration consists of a CSS property and its corresponding value, which is the value that we assign to a property. This value we assign to a property is called the declared value.