Is there markdown syntax for the equivalent of:
Take me to <a href="#pookie">pookie</a>
...
<a name="pookie">this is pookie</a>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
should be the correct markdown syntax to jump to the anchor point named pookie.
To insert an anchor point of that name use HTML:
Markdown doesn’t seem to mind where you put the anchor point. A useful place to put it is in a header. For example:
works very well. (I’d demonstrate here but SO’s renderer strips out the anchor.)
Note on self-closing tags and
id=versusname=An earlier version of this post suggested using
<a id='tith' />, using the self-closing syntax for XHTML, and using theidattribute instead ofname.XHTML allows for any tag to be ’empty’ and ‘self-closed’. That is,
<tag />is short-hand for<tag></tag>, a matched pair of tags with an empty body. Most browsers will accept XHTML, but some do not. To avoid cross-browser problems, close the tag explicitly using<tag></tag>, as recommended above.Finally, the attribute
name=was deprecated in XHTML, so I originally usedid=, which everyone recognises. However, HTML5 now creates a global variable in JavaScript when usingid=, and this may not necessarily be what you want. So, usingname=is now likely to be more friendly.(Thanks to Slipp Douglas for explaining XHTML to me, and nailer for pointing out the HTML5 side-effect — see the comments and nailer‘s answer for more detail.
name=appears to work everywhere, though it is deprecated in XHTML.)