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
- A comma groups selectors that share one declaration block.
*matches everything — useful for a reset, costly elsewhere.- Later rules of equal specificity win.
Keywords and builtins used here
marginrem
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.
Step 1 of 6 in Selectors, step 1 of 26 in Selectors & the box model.