Markdown by Example: Paragraphs
Paragraphs are the building blocks of text. This example demonstrates how to create paragraphs and line breaks.
Code
This is the first paragraph. It contains some text
that spans multiple lines in the source file.
Markdown treats single line breaks as spaces.
This is the second paragraph. It is separated from the
first one by a blank line.
To force a line break without starting a new paragraph,
end the line with two or more spaces.
Like this.
Or use a backslash at the end of the line (in some flavors).\
Like this.Explanation
In Markdown, a paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. "Blank" means the line contains nothing but spaces or tabs. If you just press Enter once, the output will usually continue on the same line (depending on the renderer), as Markdown treats single newlines as spaces to allow for hard-wrapping source text.
To create a hard line break (a <br> tag) inside a paragraph, you must end the line with two or more spaces before pressing Enter. This is invisible in the editor, which can be confusing for beginners. Some modern flavors (like GitHub Flavored Markdown) treat all newlines as hard breaks, but standard Markdown does not.
Because whitespace is significant, you should avoid indenting paragraphs with spaces or tabs, as this might trigger a code block formatting. Just keep your text flush left. The separation by blank lines is the visual cue that defines the paragraph structure.
Code Breakdown
<br> tag in the output.
