Markdown Hyperlinks
Links are one of the most fundamental elements of web content. Markdown provides several ways to create links, from simple inline links to more complex reference-style links.
Basic Link Syntax
The basic syntax for a link in Markdown is:
[Link text](URL)
Examples
[Google](https://www.google.com)
Result: Google
Links with Titles
You can add a title to your links that appears when users hover over them:
[Google](https://www.google.com "Search Engine")
Result: Google
Reference-Style Links
For longer documents or when you want to reuse links, reference-style links are very useful:
This is a [reference link][1] and this is [another one][github].
You can also use [link text itself] as the reference.
[1]: https://www.google.com
[github]: https://github.com
[link text itself]: /
Result:
This is a reference link and this is another one.
You can also use link text itself as the reference.
Automatic Links
Markdown can automatically create links for URLs and email addresses:
https://www.google.com
[email protected]
Result:
- •
- •
Internal Links
Linking to Headings
You can link to headings within the same document:
[Go to Basic Syntax](#basic-link-syntax)
[Jump to Examples](#examples)
Rules for heading links:
- •Convert to lowercase
- •Replace spaces with hyphens
- •Remove special characters
Linking to Other Pages
[Markdown Hyperlinks](/markdown-guide/hyperlink)
Result: Markdown Hyperlinks
Link Best Practices
1. Use Descriptive Link Text
❌ Don't do this:
Click [here](https://example.com) to visit our website.
Read more [here](https://example.com/blog).
✅ Do this instead:
Visit our [company website](https://example.com).
Read our [latest blog post](https://example.com/blog).
2. Keep Link Text Concise
❌ Too long:
[Click here to visit our amazing website with lots of great content](https://example.com)
✅ Just right:
[Visit our website](https://example.com)
3. Use Reference Links for Readability
When you have many links, reference style keeps content readable:
I love using [Markdown][md] for writing documentation.
It works great with [GitHub][gh] and [GitLab][gl].
[md]: https://daringfireball.net/projects/markdown/
[gh]: https://github.com
[gl]: https://gitlab.com
Special Link Types
Email Links
[Email me](mailto:[email protected])
[Email with subject](mailto:[email protected]?subject=Hello)
Phone Links
[Call us](tel:+1-555-123-4567)
Accessibility Tips
1. Indicate External Links
Let users know when links go to external sites:
[Visit Google](https://www.google.com) (external link)
2. Describe File Types
When linking to files, mention the format:
[Download report](report.pdf) (PDF, 2MB)
Links are essential for connecting your content to the wider web. Master these techniques and your Markdown documents will be more engaging and useful!
Want to learn about creating task lists? Check out our checkbox guide next.