| Heading (ATX) | # H1 … ###### H6 | <h1>H1</h1> … <h6>H6</h6> |
| Heading (Setext) | Title\n===== / Title\n----- | <h1>Title</h1> / <h2>Title</h2> |
| Bold | **bold** or __bold__ | <strong>bold</strong> |
| Italic | *italic* or _italic_ | <em>italic</em> |
| Bold + italic | ***both*** or ___both___ | <strong><em>both</em></strong> |
| Strikethrough | ~~struck~~ | <del>struck</del> |
| Inline code | `code` | <code>code</code> |
| Inline code (contains a backtick) | code with inside` `` | <code>code with inside</code>` |
| Fenced code block | ``php/ code / ` (also~~~`) | <pre class="md-code-block"><code>...</code></pre> |
| Indented code block | 4 spaces or a tab before each line (blank lines inside stay part of the same block) | <pre class="md-code-block"><code>...</code></pre> |
| Blockquote | > quoted (nested: >> quoted) | <blockquote><p>quoted</p></blockquote> |
| Unordered list (tight) | - item / * item / + item | <ul><li>item</li></ul> |
| Unordered list (loose — blank line between items) | - one\n\n- two | <ul><li><p>one</p></li><li><p>two</p></li></ul> |
| Ordered list | 1. item or 1) item | <ol><li>item</li></ol> |
| Ordered list, custom start | 7. item | <ol start="7"><li>item</li></ol> |
| List marker change starts a new list | - foo\n- bar\n+ baz | two separate <ul> elements (different bullet char = different list) |
| Ordered list can't interrupt a paragraph unless it starts at 1 | Some text\n14. more text | stays one <p>, not a <p> + <ol start="14"> |
| Link | [text](url "title") | <a href="url" title="title" rel="noopener noreferrer nofollow">text</a> |
| Link title, alternative delimiters | [text](url 'title') or [text](url (title)) | same as above |
| Link text with nested brackets | [link [foo] bar](url) | <a href="url">link [foo] bar</a> |
| Link, empty URL | [text]() | <a href="">text</a> |
| Link, angle-bracket destination (allows spaces) | [text](<my file.pdf>) | <a href="my%20file.pdf">text</a> |
| Link destination, balanced parens | [text](foo(and(bar))) | <a href="foo(and(bar))">text</a> |
| Link destination, percent-encoding | [text](foo bä) | <a href="foo%20b%C3%A4">text</a> (HTML entities decoded, then unsafe bytes percent-encoded; existing %XX sequences left alone) |
| Image |  | <img src="url" alt="alt" title="title"> |
| Autolink (angle brackets) | <https://example.com> or <user@example.com> | <a href="https://example.com">https://example.com</a> |
| Bare URL autolink (GFM ext.) | plain https://example.com in running text | auto-linked, trailing .,!?: etc. left outside the link |
Bare www. autolink (GFM ext.) | plain www.example.com in running text | linked with href="http://www.example.com" |
| Bare email autolink (GFM ext.) | plain name@example.com in running text | <a href="mailto:name@example.com">name@example.com</a> |
| Horizontal rule | ---, ***, or ___ alone on a line | <hr> |
| Hard line break | line ending in two trailing spaces | ` |
| ` | | |
| Paragraph break | blank line between blocks | separate <p> elements |
| Escaping | 0not italic1 — any ASCII punctuation character can be escaped this way, not just markdown-syntax ones | *not italic* (literal) |
| GFM table | <code>| a | b | | |