liveBook · Manning

CSS

As explained in Tiny CSS Projects

CSS3 is the generation of Cascading Style Sheets specifications that introduced and expanded features through separate modules.

Cascading Style Sheets (CSS) controls how web-page elements look. HTML supplies structure and content; CSS supplies presentation, including color, typography, and layout. CSS is declarative: you specify the appearance you want, and the browser works out how to render it. section 1.0 section 1.1.1 section 1.1.2

CSS3 names an earlier generation of specifications, not a single feature set you must enable. CSS features are developed in separate modules rather than bundled into large releases. section 1.1.1 section 1.8

To style a page, connect CSS to HTML, then write rules:

  • Apply CSS inline, in a <style> element in the HTML head, or through an external stylesheet. An external file keeps presentation separate from HTML. section 1.3 section 1.3.2 section 1.8
  • A rule pairs a selector with declarations. In `h1, h2 { color: crimson; }`, the selectors target two heading types, and the declaration gives them a color. section 1.3.2
  • If a declaration is invalid, the browser ignores it while still applying valid declarations in the rule. Browser defaults and user styles can also affect the result. section 1.3.2 section 1.8

Start with an article

Create an HTML article with headings, paragraphs, a list, and images, then link `styles.css` in the document head. Add rules incrementally: first select the elements you want to change, then choose properties and values. This produces a simple single-column page without mixing its presentation into its content. section 1.2 section 1.0

The same CSS can adapt a layout to different screens. Media queries can change styles by viewport size or capability; for a checkout cart, a practical approach is to stack content on narrow screens and add wider-screen rules afterward. CSS has limits, though: operating-system styling restricts how far some native form controls can be changed without replacing them. section 5.1 section 8.0 section 10.4

How Tiny CSS Projects covers it

How deep it goes
Explains application methods, rule syntax, invalid declarations, and browser styles, then applies CSS in visual projects.
Examples
Uses a single-column article, responsive cards, a checkout cart, and styled form controls.
What it assumes
Starts with HTML scaffolds and teaches CSS linking and element selection before properties and values.
What you can do after
Build it from scratch: link a stylesheet, write rules for HTML elements, and adjust layouts for narrow and wide screens.
How it connects
Connects CSS to HTML, separation of concerns, media queries, responsive design, and Sass.

Also explained in

Compare how 13 books explain CSS →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Tiny CSS Projects. The section links point to the parts of the book it draws on.