Note: This is an early excerpt from my upcoming Markdown book. –Paul
This chapter provides a reference for less common Markdown syntax that's of interest to writers. Note that some of this syntax may not be supported by the Markdown editor you use.
Links
Like HTML, Markdown lets you specify that a selection of text is a link, similar to a hyperlink on the web that performs some action when clicked. Each link consists of at least these two elements:
Link text. This is the text that appears as a link in your document.
Link destination. This is a Uniform Resource Identifier (URI), a sequence of characters that identifies what the link text will do when clicked.
Optionally, a link can also include:
Link title. This is text that appears in a pop-up when the reader mouses over the link text.
To create a link, surround the text that will become the link text with square brackets ([ and ]). Then, append the link address after the closing square bracket and surrounded by a pair of parentheses (( and )). If you want to add a link title, just add a space after the link destination and enclose those characters in double quotes (" and ").
Put another way, a Markdown link takes the following form:
[Link text](Link-destination)
Or, with a link title:
[Link text](Link-destination "Link title")
Markdown also lets you specify a link that consists only of the link destination. That is, instead of seeing the link text, the reader will see the link-destination. To create this type of link, surround the characters that make up the link destination with angle brackets (< and >) like so:
<Link-destination>
Hyperlinks
A hyperlink, sometimes called a web link, is the most common type of link and it works similarly to its HTML counterpart: When the reader clicks the link text, their default web browser opens and navigates to the web address--or what's known as a Uniform Resource Locator, or URL--specified by the link destination.
Markdown:
[This is a hyperlink](https://www.thurrott.com)
Rendered:
This is a hyperlink
If you add an optional link title, those characters will appear to the reader as a pop-up tooltip.
Markdown:
[This is a hyperlink](https://www.thurrott.com "This is the title")
Rendered:
To display a web address directly in text as a hyperlink, you just surround the web address (link destination) with angle brackets (< and >).
Markdown:
Visit me at <https://thurrott.com> to learn more.
Rendered:
Visit me at https://thurrott.com to learn more.
Email address links
Email address links work similarly to hyperlinks The only difference is that the link destination is an email address.
Markdown:
[Email me](mailto://[email protected])
Rendered:
Email me
✅ Tip: As with a hyperlink, you can optionally add a title for an email address link that appears to the reader as a pop-up tooltip. You can also display an email address inline in your text but still have it clickable as a...
With technology shaping our everyday lives, how could we not dig deeper?
Thurrott Premium delivers an honest and thorough perspective about the technologies we use and rely on everyday. Discover deeper content as a Premium member.