Skip to content
All referenceLinks & Media

Markdown Reference Link

How to use reference-style links in markdown to separate URL definitions from link text. Cleaner source for URL-heavy documents.

What is markdown reference link?

Reference-style links separate the link text from the URL by using a label. The link text uses [text][label] and the URL is defined elsewhere with [label]: url. This keeps long URLs out of the flow of prose, making the source markdown easier to read and maintain.

Syntax

Inline reference

The link text and label, then the URL definition anywhere in the document.

Result
Visit Google for search.

With title

Add a title in quotes after the URL for a tooltip.

Result

Implicit label

Empty brackets use the link text itself as the label.

Result

Platform support

PlatformSupportedNotes
GitHubYes
GitLabYes
ObsidianYes
DiscordNo
NotionNo
SlackNo

Common mistakes

Wrong
[text][label] without defining [label]:
Right
Define all labels at the bottom: [label]: url

Undefined reference labels render as literal text with the brackets intact, not as a link.

Tips for reference link

1Collect all references at the bottom

Placing all [label]: url definitions at the end of the document keeps them organized and makes the prose readable.

2Use for repeated URLs

If you link to the same URL multiple times, define it once as a reference and use the label throughout. One update changes all instances.

Frequently asked questions

Everything you need to know.

1

What is a reference-style link in markdown?

A reference link separates the URL from the link text. You write [text][label] in your prose and [label]: url somewhere else in the file. The link renders identically to an inline link.

Related elements

Try it in the editor

Paste your markdown and see reference link rendered instantly with professional themes.