How to place relative links in steemit posts (markdown)?

in #steemit7 years ago (edited)

I would like to be able to refer to a specific section in my post so that others can simply click and go there (in my case - different language version).

Going through the web I found a suggestion that I should simply use headers and refer to them like so:

# A header
[A link](#a-header)

Note that as I am writing this, the only way to verify is to use the preview and I am sure preview may differ from final outcome.
Anyway, in the preview headers do not have anchors generated and the link points to https://#a-header.

Then I thought about using the good old html and:

<a name="anchor-name"></a>
<a href="#anchor-name">HTML link</a>

Unfortunately while the href gets created as desired, the name parameter gets dropped. If you have an idea on what could work, please comment. In the meantime, below section is a playground to test these approaches

UPDATE: the solutions below don't work as I cannot place a named anchor in my post.

HTML link to anchor
HTML link to header
markdown link to anchor
markdown link to header

Long text to scroll.
Did you know that
while you can have
a quick bread,
extending the
preparation time
will improve
the flavour?
I ran 3K today and
had 90 minutes fun
at the swimming pool
with the kids.
Yesterday I ran 5K.
This is to compensate
no stair walk during
the remote work period.
Normally I do the stair walk
at work. We started counting
each others times. It's ground
floor to floor 14. I count my
times in two categories:
-stepping on every step
-running as absolutely
fast as possible.
For every step, my PB is 1m 52s
For every step it's 1m 32s
I don't count the 20 minutes
dying period after the
attempts for either.
OK, I think this should be enough.
You don't need to read it after the links,
I will copy and paste it so that the
anchors don't land at the bottom of the page.

Named anchor

A Header

Long text to scroll.
Did you know that
while you can have
a quick bread,
extending the
preparation time
will improve
the flavour?
I ran 3K today and
had 90 minutes fun
at the swimming pool
with the kids.
Yesterday I ran 5K.
This is to compensate
no stair walk during
the remote work period.
Normally I do the stair walk
at work. We started counting
each others times. It's ground
floor to floor 14. I count my
times in two categories:
-stepping on every step
-running as absolutely
fast as possible.
I purposefully placed this text
here to check if anyone verifies
declarations of the two
paragraphs being identical.
If you do, this was pointless
and useless, but I'm
impressed anyway.
For every step, my PB is 1m 52s
For every step it's 1m 32s
I don't count the 20 minutes
dying period after the
attempts for either.
OK, I think this should be enough.
You don't need to read it after the links,
I will copy and paste it so that the
anchors don't land at the bottom of the page.

Sort:  

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.030
BTC 67878.14
ETH 2626.92
USDT 1.00
SBD 2.64