I’m learning Markdown and got confused about line breaks. Sometimes when I press Enter, the text stays on the same line after rendering. How do you properly add a line break or start a new line in Markdown? Would appreciate a simple example.
Share
In Markdown, you can add a line break in a few different ways depending on the result you want.
### 1. Add two spaces at the end of a line
“`markdown
First line
Second line
“`
### 2. Use the HTML `
` tag
“`markdown
First line
Second line
“`
### 3. Leave a blank line for a new paragraph
“`markdown
First paragraph.
Second paragraph.
“`
The `
` tag is the most reliable method for creating a forced line break in Markdown, especially on GitHub, documentation pages, and blog platforms.