Skip to content

Hands-on learning

Learn HTML, CSS, JavaScript, React, and Web Components with live examples

CSS4HTML is a unified hub: edit code in the playground, copy ready-made patterns, and follow clear trails — from HTML to React and Web Components, through CSS and JavaScript.

Five trails, one hub

Pick where to start — or combine all five.

How to study

Several paths, one goal: understand the web in practice.

  1. Follow a trail — short lessons linked to examples and snippets.
    All trails →
  2. Break things in the playground — editable HTML + CSS (+ JS/TSX) with live preview.
    See examples →
  3. Build your kit — filter snippets by trail and tags.
    Snippet library →

Featured examples

Open, edit, and see the result instantly.

beginnerCSS

Basic selectors

Element, class, descendant, and pseudo-class selectors.

All examples →

Quick snippets

Short patterns to paste and adapt.

Basic slot

Project light DOM into the shadow with <slot>.

Browse library →

From the blog

All posts →