Links and Images
Links
Inline Links
[Link text](https://example.com)
[Link with title](https://example.com "Optional title")
Reference Links
[Link text][reference]
[Another link][ref2]
[reference]: https://example.com
[ref2]: https://example.com/page "Optional title"
Automatic Links
<https://example.com>
<user@example.com>
Internal Links (Anchors)
[Go to Installation](#installation)
[Go to API Reference](#api-reference)
Heading anchors are auto-generated:
- Convert to lowercase
- Replace spaces with hyphens
- Remove special characters
## My Section Title
<!-- Anchor: #my-section-title -->
## API Reference
<!-- Anchor: #api-reference -->
Images
Inline Images


Reference Images
![Alt text][logo]
[logo]: logo.png "Company logo"
Linked Images
[](https://example.com)
Image Size (HTML fallback)
<img src="image.png" alt="Alt text" width="200" height="100">
Best Practices
Links
- Use descriptive link text (avoid “click here” or “here”)
- Use reference links for repeated URLs
- Use automatic links for bare URLs
- Verify all links work (use link checkers)
- Use relative paths for internal documentation links
- Add titles for additional context
Images
- Always provide meaningful alt text
- Use descriptive filenames
- Optimize image sizes for web
- Use relative paths for local images
- Consider accessibility (alt text describes image content)
- Use linked images for clickable graphics
Examples
Good Links
Check the [installation guide](docs/installation.md) for setup instructions.
For more details, see the [official documentation](https://docs.example.com).
Contact us at <support@example.com>.
Bad Links
Click [here](docs/installation.md) for installation.
For more details, click [here](https://docs.example.com).
Contact us at support@example.com.
Good Images


[](https://ci.example.com)
Bad Images


Linting Rules
- MD011 (no-reversed-links): Reversed link syntax
- MD034 (no-bare-urls): Bare URL used
- MD039 (no-space-in-links): Spaces inside link text
- MD042 (no-empty-links): No empty links
- MD045 (no-alt-text): Images should have alternate text (alt text)
- MD052 (reference-links-images): Reference links and images should use a label that is defined
Configuration Example
{
"MD034": true,
"MD042": true,
"MD045": true
}