Example 1 — Select All Headings
Official idea: match every h1–h6 and mark them.
$(":header").each(function () {
$(this).append(" [header]");
}); How It Works
- Select.
$(":header")finds all heading tags. - Skip. Paragraphs and other tags are not included.
- Each. Loop marks every matched heading.

