RoboDOJO

Links and References

Learn how to create clickable links, reference links, and internal navigation in Markdown.

Basic Link Syntax

Inline Links

The most common way to create links:

MARKDOWN
[Link text](URL "Optional title")

Examples:

MARKDOWN
[Google](https://google.com)
[GitHub](https://github.com "Visit GitHub")
[Local file](./docs/readme.md)

Result: Google GitHub Local file

Automatic Links

URLs and email addresses become clickable automatically:

MARKDOWN
https://www.example.com
user@example.com

Result: https://www.example.com user@example.com

Reference Links

Basic Reference Style

Define links separately for cleaner text:

MARKDOWN
[Link text][reference-id]
[Another link][ref2]

[reference-id]: https://example.com "Optional title"
[ref2]: https://github.com

Result: Link text Another link

Shorthand References

Use the same text for link and reference:

MARKDOWN
[GitHub][]
[Stack Overflow][]

[GitHub]: https://github.com
[Stack Overflow]: https://stackoverflow.com

Result: GitHub Stack Overflow

Internal Navigation

Anchor Links

Link to headers within the same document:

MARKDOWN
## Table of Contents

- [Introduction](#introduction)
- [Getting Started](#getting-started)
- [Advanced Features](#advanced-features)

## Introduction

Content here...

## Getting Started

More content...

## Advanced Features

Even more content...

Custom Anchors

Some processors support custom anchor IDs:

MARKDOWN
## My Section {#custom-anchor}

Link to [custom section](#custom-anchor)

Advanced Link Techniques

Links with Formatting

Add formatting to link text:

MARKDOWN
[**Bold link**](https://example.com)
[_Italic link_](https://example.com)
[`Code link`](https://example.com)

Result: Bold link Italic link Code link

Image Links

Make images clickable:

MARKDOWN
[![Alt text](image.png)](https://example.com)

Relative Links

Link to files in your project:

MARKDOWN
[Documentation](./docs/README.md)
[API Reference](../api/index.md)
[Home](/)

Practical Examples

Documentation Navigation

MARKDOWN
# Project Documentation

## Quick Links

- [Installation Guide](./installation.md)
- [API Reference](./api/README.md)
- [Examples](./examples/)
- [Contributing](./CONTRIBUTING.md)
- [License](./LICENSE)

## External Resources

- [Official Website](https://project.example.com)
- [GitHub Repository](https://github.com/user/project)
- [Issue Tracker](https://github.com/user/project/issues)
- [Discussions](https://github.com/user/project/discussions)

Reference Lists

MARKDOWN
# Research Paper

## Introduction

According to recent studies[^1], the adoption of Markdown has increased significantly.
The GitHub survey[^2] shows that 78% of developers prefer Markdown for documentation.

## Methodology

We followed the guidelines outlined in the documentation[^3].

## References

[^1]: [Markdown Usage Study](https://example.com/study)

[^2]: [GitHub Developer Survey](https://github.com/survey)

[^3]: [Research Guidelines](https://example.com/guidelines)

Blog Post Links

MARKDOWN
# The Future of Web Development

## Related Articles

- [JavaScript Trends in 2024](./js-trends-2024.md)
- [CSS Grid vs Flexbox](./css-grid-flexbox.md)
- [React vs Vue Comparison](./react-vs-vue.md)

## External Resources

- [MDN Web Docs](https://developer.mozilla.org) - Comprehensive web documentation
- [Can I Use](https://caniuse.com) - Browser compatibility tables
- [Web.dev](https://web.dev) - Google's web development guidance

## Tools Mentioned

- [VS Code](https://code.visualstudio.com "Free code editor")
- [GitHub](https://github.com "Version control platform")
- [Netlify](https://netlify.com "Web hosting service")

Best Practices

1. Descriptive Link Text

Make link text meaningful:

Good:

MARKDOWN
[Download the installation guide](./install.pdf)
[View the GitHub repository](https://github.com/user/repo)

Poor:

MARKDOWN
[Click here](./install.pdf)
[Link](https://github.com/user/repo)

2. Consistent Link Styles

Choose one style and stick with it:

Consistent:

MARKDOWN
[GitHub](https://github.com)
[Documentation](./docs.md)
[Examples](./examples/)

Mixed styles:

MARKDOWN
[GitHub](https://github.com)
[Documentation][docs]


[docs]: ./docs.md

3. Organize Reference Links

Group reference links at the bottom:

MARKDOWN
# Document Content

Main content with [links][ref1] and [more links][ref2].



[ref1]: https://example.com "First reference"
[ref2]: https://github.com "Second reference"

Link Validation

Check Your Links

Always verify that links work:

MARKDOWN


- Use relative paths for internal files
- Check external links regularly
- Provide alternative text for images
- Include meaningful titles

Link Testing Tools

  • Markdown Link Check: Automated link validation
  • Broken Link Checker: Find broken links
  • LinkChecker: Command-line link validation

Platform-Specific Features

GitHub

MARKDOWN


- @username mentions: @octocat
- Issue references: #123
- Commit references: commit-hash
- Pull request links: #456

GitLab

MARKDOWN


- User mentions: @username
- Issue links: #123
- Merge request: !456
- Milestone references: %milestone

Notion

MARKDOWN


- Page links: [[Page Name]]
- Database links: @DatabaseName
- User mentions: @UserName

Accessibility Considerations

Screen Reader Friendly

MARKDOWN


[Visit our accessibility guide](./accessibility.md "Learn about web accessibility")

[Click here](./accessibility.md)[Read our accessibility guide](./accessibility.md)

Link Context

Provide context for links:

MARKDOWN
For more information about installation, see our
[step-by-step installation guide](./install.md).

The [official React documentation](https://reactjs.org/docs)
provides comprehensive learning resources.

Common Mistakes

1. Broken Relative Paths

Wrong:

MARKDOWN
[File](file.md) 

Better:

MARKDOWN
[File](./docs/file.md) 

2. Missing Protocols

Incomplete:

MARKDOWN
[Website](www.example.com) 

Complete:

MARKDOWN
[Website](https://www.example.com) 

3. Unescaped Characters

Problematic:

MARKDOWN
[Link with (parentheses)](parens>)

Escaped:

MARKDOWN
[Link with (parentheses)](parens>)

Quick Reference

Link TypeSyntaxExample
Inline[text](url)Google
Reference[text][ref][Google][google-ref]
Automaticurlhttps://google.com
Anchor[text](#header)Top
Emailemailuser@example.com

Links are the connective tissue of the web – use them to create rich, navigable content that guides your readers exactly where they need to go!