Markdown Link Syntax

Learn how to create clickable links in Markdown

Quick Reference

Inline Link

[Link text](https://example.com)

Reference Link

[Link text][1]
[1]: https://example.com

Inline Links

Inline links put the URL directly after the link text, making them easy to read and write in Markdown.

Basic Inline Links

Markdown:

Visit [Google](https://www.google.com) for searches. Check out [GitHub](https://github.com) for code. Read the [documentation](https://example.com/docs).

Output:

Visit Google for searches.

Check out GitHub for code.

Read the documentation.

Links with Titles

Markdown:

[Google](https://google.com "World's most popular search engine") [GitHub](https://github.com "Code hosting platform") [MDN](https://developer.mozilla.org "Web development docs")

Reference Links

Reference links separate the link definition from the text, making documents more readable and maintainable.

Numbered References

Markdown:

Visit [Google][1], [GitHub][2], and [Stack Overflow][3]. [1]: https://www.google.com [2]: https://github.com [3]: https://stackoverflow.com

Output:

Named References

Markdown:

The [search engine][google] and [code platform][github]. [google]: https://www.google.com "Google Search" [github]: https://github.com "GitHub Platform"

Implicit References

Markdown:

Visit [Google][] and [GitHub][]. [Google]: https://www.google.com [GitHub]: https://github.com

Output:

Visit Google and GitHub.

Different Types of Links

Email Links

Markdown:

[Email Us](mailto:contact@example.com) [Support](mailto:support@example.com?subject=Help) [Subscribe](mailto:news@example.com?subject=Subscribe&body=Please%20add%20me)

Internal Links

Markdown:

[Home Page](/) [About Page](/about) [Contact Us](/contact) [Documentation](../docs/index.html)

Anchor Links

Markdown:

[Jump to Top](#top) [See Examples](#examples) [Go to Footer](#footer) [Back to Basics](#basic-usage)

Best Practices

✅ Best Practices

  • Use descriptive link text: "Download the user manual" not "Click here"
  • Add titles for context: Provide helpful tooltip information
  • Use reference links for readability: Especially with many links
  • Test all links: Verify URLs work before publishing
  • Use HTTPS when possible: More secure than HTTP
  • Be consistent: Choose inline or reference style and stick to it

❌ Common Mistakes

  • Generic link text: "Click here", "Read more", "Link"
  • Broken URLs: Links that don't work
  • Missing protocols: Using "www.example.com" instead of "https://www.example.com"
  • Long URLs in text: Use reference links for very long URLs
  • No alt text consideration: Think about screen reader users

Common Issues and Solutions

❌ Problem: Spaces in Link Text

Wrong:

[ Click here ](https://example.com)

Correct:

[Click here](https://example.com)

No spaces between brackets and parentheses.

❌ Problem: Special Characters in URLs

Problematic:

[Search](https://example.com/search?q=hello world)

Better:

[Search](https://example.com/search?q=hello%20world)

URL-encode special characters like spaces (%20).

❌ Problem: Missing Reference Definitions

Wrong:

[Link text][missing]

Correct:

[Link text][ref] [ref]: https://example.com

Always include reference definitions.

Try Links Yourself!

Practice link syntax with our free online converter.

Related Syntax Topics