Syntax

Syntax

The basic goal of the Cascading Stylesheet (CSS) language is to allow a browser engine to paint elements of the page with specific features, like colors, positioning, or decorations. The CSS syntax reflects this goal and its basic building blocks are:

  • The property which is an identifier, that is a human-readable name, that defines which feature is considered.
  • The value which describe how the feature must be handled by the engine. Each property has a set of valid values, defined by a formal grammar, as well as a semantic meaning, implemented by the browser engine.

CSS declarations

Setting CSS properties to specific values is the core function of the CSS language. A property and value pair is called a declaration, and