In standard Markdown, place an anchor <a name="abcd"></a>
where you want to link to and refer to it on the same page by [link text](#abcd)
.
(This uses name=
and not id=
, for reasons explained in this answer.)
Remote references can use [link text](http://...#abcd)
of course.
This works like a dream, provided you have control over the source and target texts. The anchor can even appear in a heading, thus:
### <a name="head1234"></a>A Heading in this SO entry!
produces:
A Heading in this SO entry!
and we can even link to it so:
and we can even [link](#head1234) to it so:
(On SO, the link doesn't work because the anchor is stripped.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…