Example 1 — Low-Specificity Headings
The grouped heading default is easy for any class selector to override.
<style>
:where(h1, h2, h3) {
margin-block: 0 0.75rem;
}
</style>
<h1>Title</h1><h2>Section</h2><p>Text</p> How It Works
- The browser evaluates
:where(h1, h2, h3)against the document. - Only elements satisfying that selector receive the declarations.
- The rule changes the visible state without changing the HTML structure.
- Open the editor to test the selector with different markup.

