Github Markdown Same Page Link
This works on Github:
## Title
### Place 1
Hello, this is some text to fill in this, [here](#place-2), is a link to the second place.
### Place 2
Place one has the fun times of linking here, but I can also link back [here](#place-1).
### Place's 3: other example
Place one has the fun times of linking here, but I can also link back [here](#places-3-other-example).
Summary of the conversion rules:
- punctuation marks will be dropped
- leading white spaces will be dropped
- upper case will be converted to lower
- spaces between letters will be converted to
-
A good example document with plenty of links and formatting is LivingSocial API Design Guide
It's also possible to create named custom anchors, if for example you have a bunch of (sub-)headings with the same name. To do this with a header insert an HTML tag:
<h4 id="login-optional-fields">
Optional Fields
</h4>
Then link to it by the ID attribute:
[see above](#login-optional-fields)
Also adding an anchor tag directly to the document works as well:
<a id="my-anchor"></a>
Copied from GitHub Gist - the original post located here
To create anchor links that jump down to different sections of a README (as in an interactive table of contents), first create a heading:
#Real Cool Heading
The anchor link for that heading is the lowercase heading name with dashes where there are spaces. You can always get the anchor name by visiting the README on Github.com and clicking on the anchor that appears when you hover to the left of the heading. Copy everything starting at the #:
#real-cool-heading
Wherever you want to link to your Real Cool Heading section, put your desired text in brackets, followed by the anchor link in parentheses:
[Go to Real Cool Heading section](#real-cool-heading)
example 1:
##Title
###Place 1<span id="place1">HelloWorld</span>
Hello, this is some text to fill in this, [here](#place2), is a link to the second place.
###Place 2<span id="place2">HelloWorld</span>
Place one has the fun times of linking here, but I can also link back [here](#place1).
Here is a version that could jump from place1 to place2 and jump from place2 to place1
##Title
###[Place 1](#Place-2)<span id="place1">HelloWorld</span>
Hello, this is some text to fill in this, [here](#place2), is a link to the second
place.
###Place 2(#Place-1)<span id="place2">HelloWorld</span>
Place one has the fun times of linking here, but I can also link back [here](#place1).