typestar

Element selectors in CSS

Rules keyed to element names, plus the grouping and universal forms.

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}

h1, h2, h3 {
  margin-block: 1.5rem 0.5rem;
  text-wrap: balance;
}

How it works

  1. A comma groups selectors that share one declaration block.
  2. * matches everything — useful for a reset, costly elsewhere.
  3. Later rules of equal specificity win.

Keywords and builtins used here

The run, in numbers

Lines
14
Characters to type
169
Tokens
42
Three-star pace
70 tpm

At the three-star pace of 70 tokens a minute, this run takes about 36 seconds.

Type this snippet

Step 1 of 6 in Selectors, step 1 of 26 in Selectors & the box model.

Next →