CSS Syntax

A CSS rule set contains two blocks.

Selector:

The HTML element to be styled is specified by a selector.

Declaration Block:

One or more declarations containing a property name and value separated by a semicolon are included in the declaration block.

Property:

The type of attribute of the HTML element is known as property. For example, color, border, etc.

Value:

CSS properties are assigned with certain values.

Syntax:

Selector{Property1: value1; Property2: value2; ..........;}