Linking to headings
IDs are automatically generated for all headings. To see how to create links to headings, please refer to the Markdown section.
Headings are generated by lowercasing the heading content, and joining all words using hyphens.
For example, a heading containing the text My awesome heading would generate
an ID of my-awesome-heading
, which can be linked to using
[my link text](#my-awesome-heading)
.
NOTE: Pages with multiple headings containing the same text will generate IDs with numbers for each subsequent heading after the first.
For example, the following markdown:
# My heading
## Another heading
## My heading
would result in the following HTML:
<h1 id="my-heading">My heading</h1>
<h2 id="another-heading">Another heading</h2>
<h2 id="my-heading-1">My heading</h2>
Avoid using the same heading text multiple times in the same document to avoid issues with linking to headings.