devnotes.

What is CSS?

CSS (Cascading Style Sheets) is the language that controls how HTML elements look — colors, fonts, spacing, layout, and animation. If HTML is the skeleton of a page, CSS is the skin, clothes, and posture.

p {
  color: navy;
  font-size: 18px;
  line-height: 1.6;
}

This rule tells every <p> element on the page to render its text in navy blue, at 18 pixels, with generous line spacing. Without any CSS, browsers apply a bare-bones default stylesheet — black text, blue underlined links, serif fonts — functional but visually plain.

The word "cascading" refers to how CSS rules can come from multiple sources (the browser's defaults, an external stylesheet, an internal <style> block, inline style attributes) and combine or override each other based on specificity and order — a topic covered in depth later in this notebook.

CSS was first proposed in 1994 and has grown enormously since: modern CSS handles not just colors and fonts but complex responsive layouts (Flexbox, Grid), animations, and even some logic-like behavior (:has(), container queries) that once required JavaScript.

By the end of this notebook, you'll be able to take a plain, unstyled HTML page and turn it into a polished, responsive layout.