Markdown Syntax

Complete Markdown syntax reference and formatting guide.

Markdown Syntax

Complete Markdown syntax reference and formatting guide

Headers

Heading level 1

# H1
Preview: <h1>H1</h1>

Heading level 2

## H2
Preview: <h2>H2</h2>

Heading level 3

### H3
Preview: <h3>H3</h3>

Heading level 4

#### H4
Preview: <h4>H4</h4>

Heading level 5

##### H5
Preview: <h5>H5</h5>

Heading level 6

###### H6
Preview: <h6>H6</h6>

Emphasis

Italic text

*italic* or _italic_
Preview: <em>italic</em>

Bold text

**bold** or __bold__
Preview: <strong>bold</strong>

Bold and italic

***bold italic***
Preview: <strong><em>bold italic</em></strong>

Strikethrough text

~~strikethrough~~
Preview: <del>strikethrough</del>

Inline code

`code`
Preview: <code>code</code>

Lists

Unordered list (bullets)

- Item - Item
Preview: • Item • Item

Unordered list (alternative)

* Item * Item
Preview: • Item • Item

Ordered list (numbered)

1. Item 2. Item
Preview: 1. Item 2. Item

Task list (checkboxes)

- [ ] Todo - [x] Done
Preview: ☐ Todo ☑ Done

Nested list (indent 2 spaces)

- Nested
Preview: • Nested

Links & Images

Hyperlink

[Link text](https://url.com)
Preview: <a href="#">Link text</a>

Link with title

[Link](url "Title")
Preview: <a href="#" title="Title">Link</a>

Image

![Alt text](image.jpg)
Preview: <img src="#" alt="Alt text">

Image with title

![Alt](image.jpg "Title")
Preview: <img src="#" alt="Alt" title="Title">

Automatic link

<https://url.com>
Preview: <a href="#">https://url.com</a>

Reference-style link definition

[id]: https://url.com
Preview: Link reference

Code Blocks

Code block (fenced)

``` code ```
Preview: <pre><code>code</code></pre>

Code block with syntax highlighting

```javascript code ```
Preview: <pre><code class="javascript">code</code></pre>

Code block (indented 4 spaces)

code
Preview: <pre><code>code</code></pre>

Blockquotes & Horizontal Rules

Blockquote

> Quote
Preview: <blockquote>Quote</blockquote>

Nested blockquote

> Quote >> Nested
Preview: <blockquote>Quote<blockquote>Nested</blockquote></blockquote>

Horizontal rule

---
Preview: <hr>

Horizontal rule (alternative)

***
Preview: <hr>

Horizontal rule (alternative)

___
Preview: <hr>

Tables

Basic table

| Header | | ------ | | Cell |
Preview: Table with 1 column

Table with alignment

| Left | Center | Right | |:-----|:------:|------:| | L | C | R |
Preview: Left/Center/Right aligned

Multi-column table

| Header 1 | Header 2 | | -------- | -------- | | Cell 1 | Cell 2 |
Preview: 2x2 table

Advanced

Footnote reference

[^1]
Preview: Footnote¹

Footnote definition

[^1]: Footnote text
Preview: ¹ Footnote text

Completed task

- [x] Task
Preview: ☑ Task

Emoji (GitHub flavored)

:emoji:
Preview: 😊

Escape special characters

\*escaped\*
Preview: *escaped*