Using Anchor Links in Markdown

less than 1 minute read

This is a short post that might help you.

I wasn’t sure how to use anchor links in Markdown. These come in handy when you have a long post and want to link to different sections of a document for easy navigation.

The nice thing about Markdown is that it plays so well with straight HTML - so I was pleased to get it working on the first try.

First, add an anchor as regular HTML in your Markdown element. Here, it is right at a heading.

### <a id="MyHeading"></a>My Heading ###

Now, I can link it using a standard Markdown link.

Where is my [heading](#MyHeading)?

Tags: , ,

Updated:



Thank you for reading!


If you enjoy my content, consider subscribing to my weekly (and free!) newsletter called The .NET Stacks. I provide my perspective on .NET happenings and trends, interview folks in the community, and give you the resources you need to make you your best.


Buy me a coffeeBuy me a coffee

Leave a comment