Markdown New Line Guide
Master line breaks, paragraphs, and text spacing in Markdown.
Paragraph Breaks
Double Line Break
Create paragraphs by leaving a blank line:
This is the first paragraph. This is the second paragraph.
Result:
This is the first paragraph.
This is the second paragraph.
Line Breaks
Two Spaces Method
Add two spaces at the end of a line:
First line Second line
Result:
First line
Second line
Backslash Method
Use a backslash at the end of a line:
First line\ Second line
Result:
First line
Second line
HTML Line Breaks
For more control, use HTML:
First line<br> Second line<br> Third line
Result:
First line<br>
Second line<br>
Third line
Common Scenarios
Poetry and Verses
Roses are red Violets are blue Markdown is great And so are you
Addresses
John Doe 123 Main Street Anytown, ST 12345 United States
Code Comments
// This function does something important // Make sure to handle edge cases // Returns a promise
Lists and Line Breaks
Within List Items
- First item Continued on next line - Second item\ Also continued
Multiple Paragraphs in Lists
1. First item This is a second paragraph within the first item. 2. Second item
Blockquotes and Line Breaks
> This is a quote > that spans multiple lines > using line breaks
Result:
This is a quote
that spans multiple lines
using line breaks
Best Practices
- Use paragraph breaks for distinct thoughts
- Use line breaks for related content that should stay together
- Be consistent with your chosen method
- Consider readability - don't overuse line breaks
- Test rendering - different platforms may handle breaks differently
Platform Differences
GitHub
- Supports both two-space and backslash methods
- Renders line breaks in issues and comments
Standard Markdown
- Requires two spaces or backslash for line breaks
- Single line breaks are ignored
CommonMark
- Follows strict rules for line breaks
- Consistent across implementations
Troubleshooting
Line Break Not Working
❌ Wrong: First line Second line ✅ Correct: First line Second line
Unwanted Paragraph Break
❌ Creates paragraph: First line Second line ✅ Creates line break: First line Second line
Advanced Techniques
Combining with Other Elements
**Bold text** *Italic text* `Code text`
In Tables
| Column 1 | Column 2 | |----------|----------| | Line 1<br>Line 2 | Single line |