loading...
Cover image for Linking Anchors In Standard MarkDown

Linking Anchors In Standard MarkDown

claudiawu_ profile image Claudia Wu. ・1 min read

Dev.to uses standard markdown. Define an anchor you want to link to right before the line you want to refer:

<a name="anchor-name-1"></a>

and place your link:

[link text](#anchor-name-1)

If you want to link to a remote url you can also do this:

[link text](https://[...]#anchor-name-1)

Try it yourself πŸ˜‰

[Try it yourself](#try-yourself) πŸ˜‰
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
<a name="try-yourself"></a>
# If you got here it worked! πŸ€ͺ
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

If you got here it worked! πŸ€ͺ

.
.
.
.
.
.
.
.
.
.
.
.

Any ideas or feedback?

I would like to know your thoughts and experience related to this topic.

Do you like this article? Follow me on Twitter and don’t miss any future posts.

Posted on Jun 3 by:

claudiawu_ profile

Claudia Wu.

@claudiawu_

Webdeveloper, Javascript and Angular enthusiast with a preference for UX

Discussion

markdown guide
 

Another way is to use the header words separated by dashes:

# If you got here it worked

Can be anchored this way:

[Anchor link](#if-you-got-here-it-worked)

Although it's very cumbersome because it depends on the words and characters. In this regard, your way is very simpler :)

 

Is this possible only on dev.to or is it a standard markdown thing too? Thank you for this! πŸ‘