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.

Open EditorDownload PDF

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 <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 [![Alt](image.png)](https://example.com)

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. 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. 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. 3

    Can Markdown links open in a new tab?

    Not with plain Markdown syntax. Use an HTML <a> tag with target="_blank" if your platform allows inline HTML — check that it isn't sanitized out first.

  4. 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. 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. 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. 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. 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.