concept

CSS declaration

A declaration proposes a value for a property. A colon separates the name from its value; a semicolon separates adjacent declarations. An optional importance annotation is not part of the property value itself.

Formal Syntax & Structure

css syntaxcss
property: value;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>CSS reference demo</title><style>#sample { color: #184168; background-color: #eef4f8; }</style></head><body><p id="sample">A field note from the coast.</p></body></html>
CSS Reference