BudiBadu Logo
Samplebadu

Markdown by Example: Links

CommonMark / GFM

Links connect your document to the web. This sample demonstrates inline links, reference links, and auto-links.

Code

Inline link:
[Google](https://www.google.com)

Link with title (hover text):
[Google](https://www.google.com "Search Engine")

Reference-style link:
This is a link to [Google][1].

[1]: https://www.google.com

Relative link to another file:
[About Page](../about.md)

Auto-link:
<https://www.google.com>
<[email protected]>

Explanation

The standard syntax for a link is [Link Text](URL). You can optionally add a title in quotes after the URL, which appears as a tooltip when the user hovers over the link. Relative paths work as well, which is great for linking between pages in a documentation site or GitHub repository.

Reference-style links allow you to separate the link text from the URL definition. You use [Link Text][id] in the paragraph, and then define [id]: URL anywhere in the document (usually at the bottom). This keeps the source text cleaner and more readable, especially if you have many long URLs.

Auto-links are created by wrapping a URL or email address in angle brackets <...>. Markdown automatically turns this into a clickable link where the link text is the URL itself. This is a quick way to share resources without needing custom anchor text.

Code Breakdown

2
[Google](...) creates the anchor tag. The text in brackets is visible.
8
[1]: ... defines the reference. This line is not rendered in the output.