Example 1 — Group Headings
All three heading types share one declaration block.
<style>
:is(h1, h2, h3) {
color: #0f766e;
}
</style>
<h1>Title</h1><h2>Section</h2><p>Paragraph</p> How It Works
- The browser evaluates
:is(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.

