Markdown Cheat Sheet

Master Markdown with this comprehensive syntax guide. Search and find the exact formatting you need with examples and usage tips.

Try Our Markdown Editor

Want to practice Markdown? Check out our Markdown Editor - a powerful tool that lets you write and preview Markdown in real-time. Perfect for testing syntax and creating content!

34 syntax elements found
Filter by category:

#

Headers

Create H1 header

Syntax:

# Header 1

Examples:

# This is an H1 Creates a level 1 header
Header 1 ======== Alternative H1 syntax with underline

Notes:

Use one # for the largest header

##

Headers

Create H2 header

Syntax:

## Header 2

Examples:

## This is an H2 Creates a level 2 header
Header 2 -------- Alternative H2 syntax with underline

Notes:

Use two ## for the second largest header

###

Headers

Create H3 header

Syntax:

### Header 3

Examples:

### This is an H3 Creates a level 3 header

Notes:

Use three ### for the third largest header

####

Headers

Create H4 header

Syntax:

#### Header 4

Examples:

#### This is an H4 Creates a level 4 header

Notes:

Use four #### for the fourth largest header

#####

Headers

Create H5 header

Syntax:

##### Header 5

Examples:

##### This is an H5 Creates a level 5 header

Notes:

Use five ##### for the fifth largest header

######

Headers

Create H6 header

Syntax:

###### Header 6

Examples:

###### This is an H6 Creates a level 6 header (smallest)

Notes:

Use six ###### for the smallest header

**text**

Text Formatting

Make text bold

Syntax:

**bold text**

Examples:

**This is bold** Creates bold text
__This is also bold__ Alternative bold syntax using underscores

Notes:

You can use either ** or __ for bold text

*text*

Text Formatting

Make text italic

Syntax:

*italic text*

Examples:

*This is italic* Creates italic text
_This is also italic_ Alternative italic syntax using underscores

Notes:

You can use either * or _ for italic text

***text***

Text Formatting

Make text bold and italic

Syntax:

***bold and italic***

Examples:

***This is bold and italic*** Creates bold and italic text
**_This is also bold and italic_** Alternative using mixed syntax

Notes:

Combine bold and italic formatting

~~text~~

Text Formatting

Strike through text

Syntax:

~~strikethrough~~

Examples:

~~This text is crossed out~~ Creates strikethrough text

Notes:

Use double tildes for strikethrough effect

`code`

Text Formatting

Inline code formatting

Syntax:

`code`

Examples:

Use `console.log()` to print Creates inline code formatting
`` `backtick` `` Use double backticks to include backticks in code

Notes:

Use backticks for inline code formatting

* item

Lists

Create unordered list

Syntax:

* List item

Examples:

* Item 1 * Item 2 * Item 3 Creates a bulleted list
- Item 1 - Item 2 - Item 3 Alternative using hyphens
+ Item 1 + Item 2 + Item 3 Alternative using plus signs

Notes:

You can use *, -, or + for unordered lists

1. item

Lists

Create ordered list

Syntax:

1. List item

Examples:

1. First item 2. Second item 3. Third item Creates a numbered list
1. Item one 1. Item two 1. Item three You can use 1. for all items

Notes:

Numbers can be in any order, Markdown will auto-number

* item

Lists

Create nested list

Syntax:

* Nested item

Examples:

* Item 1 * Nested item * Another nested * Item 2 Creates nested lists with indentation

Notes:

Use 2-4 spaces or 1 tab for nesting

- [ ] task

Lists

Create task list with checkboxes

Syntax:

- [ ] Task item

Examples:

- [x] Completed task Checked task item
- [ ] Incomplete task Unchecked task item

Notes:

Use [x] for completed tasks, [ ] for incomplete

[text](url)

Links

Create inline link

Syntax:

[link text](URL)

Examples:

[Google](https://google.com) Creates a link to Google
[Link with title](https://example.com "Title") Link with hover title

Notes:

URL can be relative or absolute

[text][ref]

Links

Create reference-style link

Syntax:

[link text][reference]

Examples:

[Google][1] [1]: https://google.com Reference link with number
[Google][google-link] [google-link]: https://google.com Reference link with name

Notes:

Define the reference anywhere in the document

<url>

Links

Create automatic link

Syntax:

<URL>

Examples:

<https://example.com> Creates automatic link
<email@example.com> Creates automatic email link

Notes:

Angle brackets create automatic links

![alt](url)

Images

Embed inline image

Syntax:

![alt text](image URL)

Examples:

![Logo](logo.png) Embeds an image with alt text
![Logo](logo.png "Logo title") Image with title attribute

Notes:

Very similar to links, but with ! at the beginning

![alt][ref]

Images

Embed reference-style image

Syntax:

![alt text][reference]

Examples:

![Logo][logo] [logo]: logo.png Reference-style image

Notes:

Define the image reference separately

```code```

Code

Create fenced code block

Syntax:

```language code ```

Examples:

```javascript console.log('Hello'); ``` JavaScript code block with syntax highlighting
``` Plain code block ``` Code block without language specification

Notes:

Use three backticks for code blocks

code

Code

Create indented code block

Syntax:

code line

Examples:

function hello() { console.log('Hello'); } Code block using 4-space indentation

Notes:

Indent with 4 spaces or 1 tab for code blocks

| col1 | col2 |

Tables

Create table

Syntax:

| Header 1 | Header 2 | | -------- | -------- |

Examples:

| Name | Age | | ---- | --- | | John | 25 | | Jane | 30 | Simple table with headers and data

Notes:

Use pipes | to separate columns, dashes for header separator

| :--- | :---: | ---: |

Tables

Create table with column alignment

Syntax:

| Left | Center | Right | | :--- | :----: | ----: |

Examples:

| Left | Center | Right | | :--- | :----: | ----: | | L | C | R | Table with left, center, and right alignment

Notes:

Use :--- for left, :---: for center, ---: for right alignment

> quote

Blockquotes

Create blockquote

Syntax:

> Quote text

Examples:

> This is a blockquote Simple blockquote
> Multi-line > blockquote > example Multi-line blockquote

Notes:

Use > at the beginning of each line

>> quote

Blockquotes

Create nested blockquote

Syntax:

>> Nested quote

Examples:

> Outer quote >> Nested quote > Back to outer Nested blockquotes

Notes:

Use multiple > for nesting levels

---

Horizontal Rules

Create horizontal rule

Syntax:

---

Examples:

--- Horizontal rule with dashes
*** Horizontal rule with asterisks
___ Horizontal rule with underscores

Notes:

Use 3 or more -, *, or _ on their own line

Line Breaks

Create line break

Syntax:

Line 1 Line 2

Examples:

First line Second line Line break with two trailing spaces
First line\ Second line Line break with backslash (some parsers)

Notes:

End line with 2 spaces for line break

[^ref]

Footnotes

Create footnote reference

Syntax:

Text[^1]

Examples:

Text with footnote[^1] [^1]: Footnote content Numbered footnote
Text with footnote[^note] [^note]: Named footnote Named footnote

Notes:

Define footnotes at the bottom of the document

<tag>

HTML

Use HTML tags directly

Syntax:

<tag>content</tag>

Examples:

<div>HTML content</div> HTML div element
<span style="color: red">Red text</span> Inline HTML with styling

Notes:

Most HTML tags work directly in Markdown

<!-- -->

HTML

Add HTML comments

Syntax:

<!-- comment -->

Examples:

<!-- This is a comment --> HTML comment (not displayed)

Notes:

Comments are not rendered in the output

\char

Escaping

Escape special characters

Syntax:

\special_character

Examples:

\*Not italic\* Escape asterisks to prevent italic formatting
\# Not a header Escape hash to prevent header formatting
\[Not a link\] Escape brackets to prevent link formatting

Notes:

Use backslash to escape Markdown special characters

: definition

Lists

Create definition list

Syntax:

Term : Definition

Examples:

Apple : A red fruit Banana : A yellow fruit Definition list with terms and definitions

Notes:

Not supported by all Markdown parsers

*[abbr]:

Text Formatting

Define abbreviations

Syntax:

*[HTML]: HyperText Markup Language

Examples:

The HTML specification *[HTML]: HyperText Markup Language Abbreviation with hover definition

Notes:

Not supported by all Markdown parsers

Complete Markdown Reference

Below is the complete visual reference guide showing Markdown syntax alongside rendered output examples.

Headers

Syntax

# H1 ## H2 ### H3 #### H4 ##### H5 ###### H6 Alternatively, for H1 and H2: Alt-H1 ====== Alt-H2 ------

Result

H1

H2

H3

H4

H5
H6

Alt-H1

Alt-H2

Emphasis

Syntax

*italic* or _italic_ **bold** or __bold__ **_bold and italic_** ~~strikethrough~~

Result

italic or italic

bold or bold

bold and italic

strikethrough

Lists

Syntax

Unordered list: * Item 1 * Item 2 * Nested item 2.1 * Nested item 2.2 * Item 3 Alternate syntax: - Item 1 - Item 2 + Item 3 Ordered list: 1. First item 2. Second item 3. Third item 1. Nested ordered item 2. Another nested item

Result

Unordered list:

  • Item 1
  • Item 2
    • Nested item 2.1
    • Nested item 2.2
  • Item 3

Alternate syntax:

  • Item 1
  • Item 2
  • Item 3

Ordered list:

  1. First item
  2. Second item
  3. Third item
    1. Nested ordered item
    2. Another nested item

Links

Syntax

Inline-style: [Link text](https://example.com) Inline with title: [Link with title](https://example.com "Title text") Reference-style: [Reference link][ref] [ref]: https://example.com Automatic links: <https://example.com> Plain URLs: https://example.com

Result

Inline-style:
Link text

Inline with title:
Link with title

Reference-style:
Reference link

Automatic links:
https://example.com

Plain URLs:
https://example.com

Images

Syntax

Inline-style: ![Alt text](image.jpg) With title: ![Alt text](image.jpg "Image title") Reference-style: ![Alt text][img] [img]: image.jpg "Image title"

Result

Inline-style: [Image: Alt text]

With title: [Image: Alt text with title]

Reference-style: [Image: Alt text]

Code

Syntax

Inline code: `code` Code block with syntax highlighting: ```javascript var s = "JavaScript syntax"; alert(s); ``` ```python s = "Python syntax" print(s) ``` Indented code block: // 4 spaces indentation function example() {{ console.log("Hello"); }}}

Result

Inline code: code

Code block with syntax highlighting:

var s = "JavaScript syntax";
alert(s);
s = "Python syntax"
print(s)

Indented code block:

// 4 spaces indentation
function example() {{
  console.log("Hello");
}}}

Blockquotes

Syntax

> Single blockquote > Blockquote with > multiple lines > Nested blockquotes > > Nested quote > Blockquotes with **Markdown** inside

Result

Single blockquote
Blockquote with multiple lines
Nested blockquotes
Nested quote
Blockquotes with Markdown inside

Tables

Syntax

| Header 1 | Header 2 | Header 3 | | -------- | -------- | -------- | | Cell 1 | Cell 2 | Cell 3 | | Cell 4 | Cell 5 | Cell 6 | Alignment with colons: | Left | Center | Right | | :-------- | :-------: | --------: | | Aligned | Aligned | Aligned | | Left | Center | Right |

Result

Header 1Header 2Header 3
Cell 1Cell 2Cell 3
Cell 4Cell 5Cell 6

Alignment with colons:

LeftCenterRight
AlignedAlignedAligned
LeftCenterRight

Horizontal Rule

Syntax

Three or more: --- *** ___

Result

Three or more:




Line Breaks

Syntax

Line 1 with two spaces at end Line 2 Paragraph 1 with empty line between Paragraph 2

Result

Line 1 with two spaces at end
Line 2

Paragraph 1 with empty line between

Paragraph 2

Footnotes

Syntax

Here's a sentence with a footnote[^1]. [^1]: This is the footnote text. You can also use named footnotes[^note]. [^note]: Named footnotes still appear numbered.

Result

Here's a sentence with a footnote1.

1 This is the footnote text.

You can also use named footnotes2.

2 Named footnotes still appear numbered.

Task Lists

Syntax

- [x] Completed task - [ ] Uncompleted task - [x] Task with **bold text** - [ ] Another unchecked task

Result

  • Completed task
  • Uncompleted task
  • Task with bold text
  • Another unchecked task

Inline HTML

Syntax

You can use HTML tags directly in Markdown: <div class="custom-class"> Content with **markdown** inside </div> <details> <summary>Click to expand</summary> Hidden content here... </details>

Result

You can use HTML tags directly in Markdown:

Content with markdown inside
Click to expand

Hidden content here...