In Markdown, what is the best way to link to a fragment of a page, i.e. #some_id?

See this answer.

In summary make a destination with

<a name="sometext"></a>

inserted anywhere in your markdown markup (for example in a header:

## heading<a name="headin"></a>

and link to it using the markdown linkage:

[This is the link text](#headin)

or

[some text](#sometext)

Don’t use <div> — this will mess up the layout for many renderers.

(I have changed id= to name= above. See this answer for the tedious explanation.)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)