The Complete Guide to Markdown Formatting
For rendering tests/debugging.
1. Headings (ATX style)
H1 Heading
H2 Heading
H3 Heading
H4 Heading
H5 Heading
H6 Heading
Headings can also use Setext style (H1/H2)
H1 equals-sign line
H2 equals-sign line
2. Paragraphs and Line Breaks
This is the first paragraph.
Add two spaces at the end of a line for a line break.
This is the second paragraph, with a blank line between paragraphs.
3. Emphasis
Italic or italic
Bold or bold
Bold italic or bold italicStrikethrough
Underline (HTML)
==Highlight== (partially implemented, non-standard GFM, but common)
H2O subscript (must be enabled)
X^2^ superscript (must be enabled)
4. Lists
Unordered list
- Item 1
- Item 2
- Indented sub-item
- Sub-item 2
- Indented further
- Asterisk list
- Plus list
Ordered list
- First item
- Second item
- Sub-item 1
- Sub-item 2
- Third item (non-sequential numbers are fine)
- Numbering continues automatically
Task list (GFM)
- Not done
- Done
- Subtask
- Subtask done
- Subtask not done
5. Code
Inline code const foo = 'bar';
Fenced code block:
function greet(name) {
console.log(`Hello, ${name}!`);
}
Indented code block:
def hello():
print("indented code block")
Fenced block with a language specified (displays even without highlighting):
SELECT * FROM users WHERE id = 1;
6. Blockquotes
This is a first-level quote.
This is a nested second-level quote.
Third-level quote.
Back to first level.
Quotes can contain other elements:
Heading inside a quote
- List item
code
7. Links
Inline link
[Reference link][ref]
[Empty reference][]
Relative path
Autolink: https://example.com
Autolink email: user@example.com
8. Images

Reference-style image:
![Referenced image][imgref]
9. Tables (GFM)
| Left aligned | Center aligned | Right aligned |
|---|---|---|
| Cell 1 | Cell 2 | Cell 3 |
| Long content text | Long content text | Long content text |
| Empty | Has value |
No header separator line, but a delimiter row is required (it gets parsed as the header):
| One | Two | Three |
|---|---|---|
| Row 1 | Value | Value |
Use <br> for line breaks inside tables:
| First line
Second line | Plain |
10. Horizontal Rules
--- (three or more hyphens)
*** (asterisks)
___ (underscores)
11. Escape Characters
* Backslash escapes the asterisk
# Escapes heading
[ Escapes square bracket
]
( )
{ }
_
-
+
.
!
`
\
12. Inline HTML
Red text
Line break
13. Footnotes (non-standard GFM, partially supported)
This is a footnote example[^1]
Another footnote[^2]
Second line (indented).
14. Definition Lists (non-standard, partially supported)
Term 1
: Definition 1
: Definition 2
Term 2
: Nested definition
> Quote
15. Indentation, In-paragraph Line Breaks, and Whitespace
Within a paragraph
line break (two spaces at the end of the line)
Blank line between paragraphs
Space entities
16. Mixed Nesting Test
Heading inside a quote
- List inside a quote
- Ordered list inside a quote
Code block inside a quote
Table inside a quote Column Value Value
- Blockquote inside a list:
Quote inside a list
multiple lines
- Code block inside a list:
print("code inside a list")
- Table inside a list:
a b c d
17. Special Characters and Unicode
© ® ™ ° ± π ∑ √ ∞ ≠ ≤ ≥
Chinese: testing Chinese text display
Emoji: 😊 🚀 ❤️ ✅ 🔥
Japanese: こんにちは
Korean: 안녕하세요
Arabic numerals: 1234567890
Special symbols: ~|@#$%^&*()_+
18. Long Text and Line Wrapping Test
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
19. Empty Elements and Edge Cases
Empty list items:
- Normal item
Empty table cells:
| Left | Center | Right |
|---|---|---|
| Present | Present | |
| Empty |
Empty quote:
Empty code block:
Consecutive horizontal rules:
20. Multi-level Lists Mixed with Indentation
- First-level ordered item
- Unordered sub-item
- Ordered sub-sub-item
- Task sub-sub-item
- Done
- Ordered sub-sub-item
- Another sub-item
Quote inside a sub-item
continues
- Unordered sub-item
- First-level ordered item, second one
- Sub-item
- Sub-sub-item
- Sub-sub-sub-item
- Sub-sub-item
- Sub-item
21. Images Mixed with Links
22. Autolink Detection (GFM)
https://github.com
http://example.com/path?query=1#fragment
www.example.com (non-standard, but sometimes parsed)
ftp://files.example.com
23. Strikethrough, Bold, and Italic Mixed
Italic strikethrough
Bold italicBold strikethroughBold italic strikethrough
24. Underline, Strikethrough, and Emphasis Boundaries
Bold _with underscores_ bold
Italic with bold italic
Bold next to italic
25. Escape Sequence Test
`not code`
*not italic*
_not italic_
[not link]
![not image]
#not heading
- not list
+ not list
. not numbered
\ backslash
The End