Introduction

CSS (Cascading Style Sheets) allows you to style HTML elements, defining how they should look like.

CSS Syntax

Each CSS rule has the following:

  • one or more selectors (these indicate which HTML elements should be affected by the rule)
  • one or more declarations in the form of property-value pairs (these define what the rule does)
Basic CSS syntax: selector, property, and value.
Basic CSS syntax: selector, property, and value.

Anything between /* and */ are comments and do nothing.

Example

| LIVE PREVIEW
one two three