Markdown Links
Markdown links connect readers to web pages, documentation, files, email addresses, and sections within the same document — used constantly in READMEs, technical docs, and knowledge bases. This guide covers every link type Markdown supports, including two that most guides skip: adding a tooltip to a link, and opening a link in a new tab.
For the full syntax reference, see Markdown Syntax. New to Markdown? Start with Markdown Basics.
🟢 Practice as you read: Open the Markdown Editor to test each example, or use the Markdown Link Generator to build one quickly.
Syntax at a Glance
| Link type | Syntax |
|---|---|
| Inline | [Link Text](https://example.com) |
| With a tooltip | [Link Text](https://example.com "Tooltip text") |
| Reference | [Link Text][ref] then [ref]: https://example.com |
| Automatic (autolink) | <https://example.com> |
<email@example.com> or [Email Us](mailto:email@example.com) |
|
| Relative | [Guide](docs/guide.md) — resolved from the current file |
| Root-relative | same syntax with a path from the site root, e.g. /markdown-lists |
| Heading anchor | [Jump to Installation](#installation) |
| Image as link | [](https://example.com) |
What Are Markdown Links?
A Markdown link has two parts: the link text readers see and click, and the destination — a URL, file path, email address, or heading the link points to.
[Link Text](https://example.com)
Example
[MDConvertHub](https://mdconverthub.com)
Output
Live Preview
If you're new to Markdown, the Markdown Basics guide covers the fundamentals before you dig into the different link types.
Inline Links
The most common way to add a hyperlink — text and destination written together.
Visit the [GitHub website](https://github.com).
Output
Live Preview
Visit the GitHub website.
Best for tutorials, blog posts, and documentation where you only need to reference a URL once and readability matters more than reusing it.
Adding a Tooltip to a Link
Add optional hover text with a quoted title after the URL:
[MDConvertHub](https://mdconverthub.com "Free online Markdown tools")
Many Markdown renderers pass this title through to the underlying HTML title attribute, where browsers commonly display it as hover text — but this depends on both the renderer and the browser, so don't rely on it as a guaranteed feature. It's optional, and worth using only when the link text alone doesn't fully explain the destination.
Reference Links
Separates the link text from the destination — useful when the same link appears multiple times, or to keep long documents easier to read.
Visit the [documentation][docs].
[docs]: https://mdconverthub.com/docs
Common in README files and long technical guides, since the URL is defined once and reused throughout the document.
Automatic Links
Also called autolinks in the CommonMark and GitHub Flavored Markdown specs — a URL or email address wrapped in angle brackets becomes clickable with no custom link text needed.
<https://mdconverthub.com>
Output
Live Preview
Use this when the complete URL matters, such as in source references or public resources readers may want to copy directly.
Email Links
<support@example.com>
or
[Email Us](mailto:support@example.com)
Selecting either opens the reader's default email app with the recipient pre-filled — common on contact pages and support docs.
Relative and Root-Relative Links
Both point to files within the same project instead of a full URL, but they resolve differently.
Relative paths are based on the current file's location:
[Installation Guide](docs/installation.md)
[Parent Guide](../README.md)
Root-relative paths start with / and resolve from the site root, regardless of which page they're on — common for linking between pages on the same website:
[Markdown Lists](/markdown-lists)
Both keep working when a repository is cloned or moved, which is why relative and root-relative links are standard in GitHub projects and documentation sites alike.
Links to Headings
Many Markdown platforms generate anchor IDs for headings automatically, letting readers jump straight to a section — but the exact ID format depends on the platform, so it's worth confirming on yours:
[Jump to Installation](#installation)
## Installation
Especially useful in long guides and API docs with many sections. See Markdown Headings for how those anchor IDs are generated.
Images as Links
Wrap an image in link syntax to make it clickable — common for logos, badges, and banners.
[](https://example.com)
For image syntax without a link, see Markdown Images.
Opening Links in a New Tab
Standard Markdown has no syntax for this — [Text](url) always follows platform default behavior, and there's no target="_blank" equivalent. If your platform allows inline HTML, use an <a> tag instead:
<a href="https://example.com" target="_blank" rel="noopener">Visit Site</a>
Check whether your platform (static site generator, CMS, or documentation tool) sanitizes HTML before relying on this — some strip the target attribute for security reasons.
Best Practices
- Use descriptive link text. Tell readers what they'll find before they click — avoid generic phrases like "click here" or "read more."
- Prefer HTTPS whenever it's available.
- Use relative or root-relative links within a project so they keep working if the repository or docs site moves.
- Keep link text concise — short, descriptive phrases are easier to scan than full sentences.
- Avoid stacking multiple links in one sentence unless they're closely related; it hurts readability.
- Check every link before publishing — URLs, file paths, and heading anchors all break silently, not loudly.
Good
Read the [Installation Guide](/markdown-basics)
Avoid
[Click here](https://example.com)
Before publishing large documentation projects, run them through the Markdown Link Checker to catch broken links and invalid URLs.
Common Mistakes
| Mistake | Fix |
|---|---|
Missing closing parenthesis: [GitHub](https://github.com |
[GitHub](https://github.com) |
Empty link text: [](https://example.com) |
[Project Website](https://example.com) |
Broken relative path: [Guide](guide.md) when the file is actually in docs/ |
[Guide](docs/guide.md) |
| Unescaped parentheses inside the URL itself | Wrap the URL in angle brackets, or percent-encode the parentheses |
Markdown Link Compatibility
| Platform | Inline | Reference | Auto Links | Relative Links |
|---|---|---|---|---|
| GitHub | ||||
| GitLab | ||||
| VS Code | ||||
| Obsidian | ||||
| Notion | Partial | Limited | ||
| Discord |
Frequently Asked Questions
- 1
How do I create a Markdown link?
Use
[Link Text](https://example.com)— replace "Link Text" with what readers should click, and the URL with your destination. - 2
How do I add a tooltip to a Markdown link?
Add a quoted title after the URL:
[Link Text](https://example.com "Tooltip text"). Many renderers pass it through to HTML, where browsers commonly show it as hover text — though this isn't guaranteed on every platform. - 3
Can Markdown links open in a new tab?
Not with plain Markdown syntax. Use an HTML
<a>tag withtarget="_blank"if your platform allows inline HTML — check that it isn't sanitized out first. - 4
Can Markdown link to another section on the same page?
Yes. Many Markdown platforms generate heading IDs automatically, but the exact anchor format can vary — link to one using
#heading-id, e.g.[Jump to Installation](#installation). - 5
What are reference links, and when should I use them?
Reference links store the destination separately from the link text, which keeps long documents readable when the same URL is reused multiple times.
- 6
Does GitHub support relative links?
Yes — GitHub supports relative links between files and folders in the same repository, which is why they're standard in READMEs and project wikis.
- 7
Can I create email links in Markdown?
Yes, using
mailto:—[Email Us](mailto:support@example.com)opens the reader's default email app with the recipient filled in. - 8
Why isn't my link working?
Most often a missing closing parenthesis, an empty link text block, a relative path that doesn't match the actual file location, or an unescaped parenthesis inside the URL itself.
