On this page

4.8Paragraphs

A sequence of non-blank lines that cannot be interpreted as other kinds of blocks forms a paragraph. The contents of the paragraph are the result of parsing the paragraph’s raw content as inlines. The paragraph’s raw content is formed by concatenating the lines and removing initial and final spaces or tabs.

A simple example with two paragraphs:

aaa

bbb
<p>aaa</p>
<p>bbb</p>

Paragraphs can contain multiple lines, but no blank lines:

aaa
bbb

ccc
ddd
<p>aaa
bbb</p>
<p>ccc
ddd</p>

Multiple blank lines between paragraphs have no effect:

aaa


bbb
<p>aaa</p>
<p>bbb</p>

Leading spaces or tabs are skipped:

  aaa
 bbb
<p>aaa
bbb</p>

Lines after the first may be indented any amount, since indented code blocks cannot interrupt paragraphs.

aaa
             bbb
                                       ccc
<p>aaa
bbb
ccc</p>

However, the first line may be preceded by up to three spaces of indentation. Four spaces of indentation is too many:

   aaa
bbb
<p>aaa
bbb</p>
    aaa
bbb
<pre><code>aaa
</code></pre>
<p>bbb</p>

Final spaces or tabs are stripped before inline parsing, so a paragraph that ends with two or more spaces will not end with a hard line break:

aaa     
bbb     
<p>aaa<br />
bbb</p>

4.9Blank lines

Blank lines between block-level elements are ignored, except for the role they play in determining whether a list is tight or loose.

Blank lines at the beginning and end of the document are also ignored.

  

aaa
  

# aaa

  
<p>aaa</p>
<h1>aaa</h1>