Using line breaks correctly improves readability and keeps your Markdown documents consistent across different platforms.
Use Paragraphs for Most Content
For articles, tutorials, documentation, and blog posts, use paragraph breaks instead of multiple line breaks.
Good example:
Markdown is easy to learn.
It uses a simple plain text syntax.
Paragraphs are easier to read and follow standard writing conventions.
Use Hard Line Breaks Only When Needed
Hard line breaks are useful for content where each line must appear separately.
Examples include:
- Postal addresses
- Contact information
- Poetry
- Song lyrics
- Release notes
Avoid using hard line breaks for normal paragraphs.
Prefer <br> for Better Compatibility
If you need a guaranteed line break across multiple Markdown processors, use the HTML <br> tag.
Example:
Support Email<br>
support@example.com
Output
Rendered Output
Support Email
support@example.com
This approach is reliable in GitHub, GitLab, Hugo, Docusaurus, MkDocs, and many other Markdown environments.
Preview Before Publishing
Different Markdown parsers handle line breaks slightly differently.
Always preview your document in the platform where it will be published.
Examples include:
- GitHub
- GitLab
- Obsidian
- VS Code
- Hugo
- MkDocs
Previewing helps catch formatting issues before your readers do. Open the Markdown Editor to verify rendering before you publish.
Keep Formatting Consistent
Choose one method for creating line breaks and use it consistently throughout your documentation.
Consistent formatting makes documents easier to maintain.