Markdown Links

Markdown links connect readers to web pages, documentation, files, email addresses, and sections within the same document. They're an essential part of GitHub README files, technical documentation, knowledge bases, and project guides.

This guide covers inline, reference, automatic, relative, email, and heading links with practical examples, formatting tips, and common mistakes to help you build clear, reliable documentation.

🟢 Practice as you read: Open the Markdown Editor to test every link example with live preview, or use the Markdown Link Generator to create Markdown links quickly.

Open EditorDownload PDF

Common Mistakes

Most Markdown link issues are caused by small syntax errors, missing characters, or incorrect file paths. Reviewing these common mistakes before publishing helps ensure every link works as expected.

Missing Closing Parenthesis#

A missing closing parenthesis prevents Markdown from recognizing the link correctly.

Incorrect

[GitHub](https://github.com

Correct

[GitHub](https://github.com)

Every link should include meaningful anchor text. Descriptive links improve readability and help readers understand the destination before clicking.

Avoid

[](https://example.com)

Better

[Project Website](https://example.com)

Broken Relative Paths#

Relative links only work when the file path is correct. Double-check folder names and file locations before publishing your documentation.

Incorrect

[Guide](guide.md)

Correct

[Guide](docs/guide.md)

Before publishing, test external URLs, relative paths, and heading anchors to avoid broken navigation and improve the reader's experience.

Frequently Asked Questions

  1. 1

    How do I create a Markdown link?

    Use the following syntax to create an inline Markdown link: ``markdown [Link Text](https://example.com) ` Replace Link Text` with the text readers will click and replace the URL with your destination.

  2. 2

    Can Markdown link to another section on the same page?

    Yes. Most Markdown editors automatically generate anchor links for headings. You can link to a heading using its ID, for example #installation, to help readers jump directly to a section.

  3. 3

    What are reference links?

    Reference links store the destination URL separately from the main content, making long documents easier to read and maintain when the same link is used multiple times.

  4. 4

    Does GitHub support relative links?

    Yes. GitHub supports relative links between files and folders within the same repository, making them ideal for README files, documentation, and project wikis.

  5. 5

    Can I create email links in Markdown?

    Yes. Use the mailto: format to create a clickable email link that opens the user's default email application with the recipient already filled in.