Thematic breaks
A line consisting of 0-3 spaces of indentation, followed by a sequence of three or more matching -
, _
, or *
characters, each followed optionally by any number of spaces or tabs, forms a thematic break.
Example 13
Markdown | HTML | Demo |
---|---|---|
|
|
Wrong characters:
Example 14
Markdown | HTML | Demo |
---|---|---|
|
|
Example 15
Markdown | HTML | Demo |
---|---|---|
|
|
Not enough characters:
Example 16
Markdown | HTML | Demo |
---|---|---|
|
|
One to three spaces indent are allowed:
Example 17
Markdown | HTML | Demo |
---|---|---|
|
|
Four spaces is too many:
Example 18
Markdown | HTML | Demo |
---|---|---|
|
|
Example 19
Markdown | HTML | Demo |
---|---|---|
|
|
More than three characters may be used:
Example 20
Markdown | HTML | Demo |
---|---|---|
|
|
Spaces are allowed between the characters:
Example 21
Markdown | HTML | Demo |
---|---|---|
|
|
Example 22
Markdown | HTML | Demo |
---|---|---|
|
|
Example 23
Markdown | HTML | Demo |
---|---|---|
|
|
Spaces are allowed at the end:
Example 24
Markdown | HTML | Demo |
---|---|---|
|
|
However, no other characters may occur in the line:
Example 25
Markdown | HTML | Demo |
---|---|---|
|
|
It is required that all of the non-whitespace characters be the same. So, this is not a thematic break:
Example 26
Markdown | HTML | Demo |
---|---|---|
|
|
Thematic breaks do not need blank lines before or after:
Example 27
Markdown | HTML | Demo |
---|---|---|
|
|
Thematic breaks can interrupt a paragraph:
Example 28
Markdown | HTML | Demo |
---|---|---|
|
|
If a line of dashes that meets the above conditions for being a thematic break could also be interpreted as the underline of a setext heading, the interpretation as a setext heading takes precedence. Thus, for example, this is a setext heading, not a paragraph followed by a thematic break:
Example 29
Markdown | HTML | Demo |
---|---|---|
|
|
When both a thematic break and a list item are possible interpretations of a line, the thematic break takes precedence:
Example 30
Markdown | HTML | Demo |
---|---|---|
|
|
If you want a thematic break in a list item, use a different bullet:
Example 31
Markdown | HTML | Demo |
---|---|---|
|
|