Heading IDs in markdown

Heading IDs are useful when a section of text gets lengthy, allowing the reader to find their way

Custom IDs allow you to create linkable headings and style them with CSS.

Add the custom ID in curly braces {#id} after the heading text:


### Heading {#heading-id}

This is the rendered HTML that will produce:


<h3 id="custom-id">Some heading</h3>

You can link directly to headings using their custom IDs.

MarkdownHTMLRendered output
[Heading ID](#heading-id)<a href="#heading-id">Heading ID</a>Heading ID

Other sites can link to your heading using the full URL plus the ID.

Obsidian

In Obsidian’s documentation there is no reference to ‘Heading IDs’. Instead, it discusses a link to a heading in a note.

Download the
cheat sheet

Some wording here. You can include a maximum of 30 words in your message to our readers. 90 characters