What is CSS?

CSS stands for cascading style sheets

It can be used for:

  • Layout

  • Styling e.g. color, size of headers, links

It is declarative (rules based).

Rules syntax

We declare the selector (h1). This then gets applied to all html components with h1.

We then declare key, value pairs of properties.

h1 {
  color: red;
  font-size: 5em;
}

Specification

W3C has a working group for CSS this are generally for people doing implementation of the CSS spec. Not pragmatic for users.

Reference Mozilla CSS docs instead.

References