Inline links (the common form)
The basic form is square brackets for the text and parentheses for the URL. This is what you will use most of the time: it keeps the link text and destination together and needs no second step.
- [link text](https://example.com)
- [link text](https://example.com "Hover title")
Reference-style links
When the same URL appears many times, or when a long URL would clutter the paragraph, use a reference link. The text refers to a label, and the label's definition sits elsewhere — usually at the bottom of the document. This keeps the prose readable and lets you change a URL in one place.
- See the [documentation][docs] for details.
- Then, later in the file:
- [docs]: https://example.com/docs
Automatic links
GitHub-flavoured Markdown auto-links bare URLs wrapped in angle brackets, and often links plain URLs with no markup at all. For maximum portability, the angle-bracket form is the safer choice because not every renderer auto-links bare text.
- <https://example.com>
Linking to a section (anchor links)
To link to a heading within the same document, use the heading's anchor in the URL. Anchors are usually the heading text lowercased, with punctuation removed and spaces replaced by hyphens. So a heading 'Getting Started' becomes #getting-started. This is how a table of contents links to its sections.
- [Jump to Usage](#usage)
- [Jump to Install](#installation)
Email links
An email address in angle brackets becomes a mailto link. This is convenient for a contact line, though be aware that plain-text email addresses attract spam; on a public page a contact form is usually better.
Mistakes that break links
- Missing parentheses or brackets, leaving the syntax visible as text
- Spaces inside the URL — URLs must not contain literal spaces; use %20 instead
- Unclosed brackets in the link text, which swallows the rest of the line
- Anchor links whose slug does not match the heading's auto-generated anchor
- Reference definitions with a typo in the label, so the link resolves to nothing