Skip to content

HTML CSS Fundamentals Textbook

A free, self-paced textbook in 8 chapters. Read a chapter, then drill it with the 170 companion flashcards using spaced repetition.

8 chapters · 170 cards · Updated

Chapters

  1. 1Foundations of HTML Document Structure

    Every HTML5 page begins with a doctype declaration, written as `` on the very first line. This single line tells the browser to render the document in standards mode, following the...

  2. 2Forms, Validation & Accessibility

    HTML5 dramatically expanded form capabilities beyond simple text and password fields. Modern input types include `email` and `url` for automatic format validation, `number` with bu...

  3. 3CSS Selectors & the Cascade

    CSS selectors are the foundation of styling, targeting HTML elements through several basic mechanisms. The element selector applies to every instance of a tag, the class selector t...

  4. 4The Box Model, Display & Positioning

    Every element in CSS is rendered as a rectangular box composed of four layers: the content itself (text or images), padding (space between the content and the border), the border t...

  5. 5Flexbox & CSS Grid Layout

    Flexbox (Flexible Box Layout) is a one-dimensional layout model designed for distributing space and aligning items along a single direction, either a row or a column. It excels at...

  6. 6Responsive Design, Units & Custom Properties

    Responsive web design adapts layouts to the user's device, beginning with the viewport meta tag: ``. Without it, mobile browsers render the page at a desktop width (typically 980 p...

  7. 7Animations, Transforms & Visual Effects

    CSS transitions animate property changes smoothly over time, defined with `transition: property duration timing-function delay`. When a listed property changes (for example, a butt...

  8. 8Performance, Loading & Advanced HTML

    Script loading behavior dramatically affects perceived performance. A stylesheet `` is render-blocking, because the browser pauses rendering until the CSS is fetched and parsed (ot...

← Back to the HTML CSS Fundamentals deck