Links

christian.dinh's avatar
Published Aug 6, 2021Updated Jul 30, 2024
Contribute to Docs

In Markdown, a link is created by enclosing the link text in square brackets, [Link text], and then following it immediately with the URL in parentheses, (https://website-name.com).

[Link text](https://website-name.com)

For example:

We just updated our [Docs Contribution Guide](https://www.codecademy.com/pages/contribute-docs)!

The output would look like:

We just updated our Docs Contribution Guide!

A title for a link can be optionally added. This will appear as a tooltip when the user hovers over the link. To add a title, enclose it in quotation marks "" after the URL inside the parentheses.

Including link titles improves accessibility by providing additional context for screen readers and users navigating with the keyboard.

[Link text](https://website-name.com 'Link title')

For example:

My favorite Craigslist category is [Missed Connections](https://newyork.craigslist.org/d/missed-connections/search/mis 'The best place on the internet').

The output would look like:

My favorite Craigslist category is Missed Connections.

URLs and Email Addresses

To turn a URL or email address into a clickable link, enclose it in angle brackets <URL or email>.

The rendered output looks like this:

Internal Linking

An internal link can be used to navigate to other sections within the same document, or sections within other documents on the same website. To add an internal link, use a relative path (when linking to sections in other documents) with the # symbol, followed by the section’s title. Ensure the title is in lowercase, omit any punctuation and replace spaces with hyphens.

For example, to link to the Accessibility: Link Titles section above:

[Accessibility: Link Titles](#accessibility-link-titles)

The output would look like:

[Accessibility: Link Titles](#accessibility-link-titles)

All contributors

Contribute to Docs

Learn Markdown on Codecademy