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...

πŸ“ What is Markdown?

Markdown is a lightweight markup language created by John Gruber in 2004 with significant contributions from Aaron Swartz. Designed to be easy to read and write, Markdown allows you to format text using simple, intuitive syntax that converts to HTML. With its philosophy of "easy to write, easy to read," Markdown has become the standard for documentation, README files, blogs, and technical writing across the software industry and beyond.

πŸš€ Core Benefits

  • βœ“ Simplicity: Learn the entire syntax in minutes, not hours
  • βœ“ Readability: Plain text format readable without rendering
  • βœ“ Portability: Works anywhere plain text works
  • βœ“ Platform-independent: No vendor lock-in or proprietary formats
  • βœ“ Web-ready: Converts cleanly to HTML for web publishing
  • βœ“ Version control friendly: Perfect for Git and collaborative workflows

πŸ’‘ Why Use Markdown?

  • β€’ Focus on content: Write without worrying about formatting
  • β€’ Fast writing: No need to reach for mouse or complex menus
  • β€’ Future-proof: Plain text will always be readable
  • β€’ Universal support: Supported everywhere from GitHub to blogs
  • β€’ Easy collaboration: Share and edit with anyone, any editor
  • β€’ Multiple outputs: Convert to HTML, PDF, Word, slides, etc.

πŸ“– Markdown Philosophy

"Easy to Write"

Markdown syntax should be intuitive and quick to type. No complex tags or memorizing dozens of formatting codes.

"Easy to Read"

The raw Markdown text should be readable and make sense even without being rendered to HTML.

Example Comparison

Markdown:

**Bold text** and *italic text*

HTML:

<strong>Bold text</strong> and <em>italic text</em>

🎯 Common Use Cases

Software Development

  • β€’ README files and documentation
  • β€’ GitHub/GitLab issues and comments
  • β€’ Code documentation and wikis
  • β€’ Release notes and changelogs
  • β€’ API documentation

Content Creation

  • β€’ Blog posts and articles
  • β€’ Technical writing and tutorials
  • β€’ Books and e-books
  • β€’ Academic papers and notes
  • β€’ Personal journaling

Team Collaboration

  • β€’ Meeting notes and agendas
  • β€’ Project documentation
  • β€’ Task lists and project planning
  • β€’ Knowledge base articles
  • β€’ Email formatting (some clients)

🌍 Markdown Everywhere

Popular Platforms

  • β€’ GitHub: READMEs, issues, pull requests, discussions
  • β€’ Reddit: Comments and posts formatting
  • β€’ Discord/Slack: Message formatting and rich text
  • β€’ Notion: Page content and documentation
  • β€’ Obsidian: Note-taking and knowledge management
  • β€’ Jekyll/Hugo: Static site generators for blogs

Tools & Editors

  • β€’ Typora: WYSIWYG Markdown editor
  • β€’ Mark Text: Real-time preview editor
  • β€’ VS Code: Built-in Markdown preview and extensions
  • β€’ Zettlr: Academic writing and research
  • β€’ Bear: Note-taking app with Markdown support
  • β€’ Pandoc: Universal document converter

πŸ”§ Markdown Flavors

Standard Markdown

Original specification by John Gruber with basic formatting elements.

CommonMark

Standardized specification that clarifies ambiguities in original Markdown.

GitHub Flavored Markdown (GFM)

GitHub's extended version with tables, task lists, strikethrough, and more.

Extended Features

  • β€’ Tables: Pipe-separated table syntax
  • β€’ Task Lists: Checkboxes with - [x] syntax
  • β€’ Strikethrough: ~~crossed out text~~
  • β€’ Syntax Highlighting: Code blocks with language
  • β€’ Emoji: :emoji: shortcode support
  • β€’ Math: LaTeX math expressions (some flavors)

πŸš€ Getting Started with Markdown

1. Choose Your Editor

Start with any text editor β€’ Try online editors like our Markdown Editor β€’ Use VS Code with Markdown preview for development

2. Learn the Basics

Master headers (#), bold (**text**), italic (*text*) β€’ Practice links and lists β€’ Experiment with code blocks

3. Practice with Real Content

Write a README for a project β€’ Create documentation β€’ Try our interactive Markdown Editor for immediate feedback

4. Explore Advanced Features

Learn tables, task lists, and code syntax highlighting β€’ Explore your platform's specific Markdown flavor

βš–οΈ Markdown vs. Alternatives

Markdown Advantages

  • β€’ Lightweight and fast to write
  • β€’ Human-readable source format
  • β€’ Platform and tool independent
  • β€’ Version control friendly
  • β€’ Wide ecosystem support
  • β€’ Easy to learn and remember

Alternatives

  • β€’ HTML: More powerful but verbose and complex
  • β€’ reStructuredText: More features but steeper learning curve
  • β€’ AsciiDoc: More structured, better for large documents
  • β€’ LaTeX: Academic standard, complex but powerful
  • β€’ Rich Text Editors: WYSIWYG but not portable

πŸŽ“ Markdown Best Practices

Writing Style

  • β€’ Use consistent heading hierarchy
  • β€’ Add blank lines around headers and lists
  • β€’ Prefer ATX-style headers (# instead of underlines)
  • β€’ Use meaningful link text, not "click here"
  • β€’ Keep lines under 80 characters when possible

Organization

  • β€’ Structure content with clear headings
  • β€’ Use tables of contents for long documents
  • β€’ Organize files in logical directory structures
  • β€’ Include cross-references between related documents
  • β€’ Use consistent naming conventions

Markdown Mastery: "The best way to learn Markdown is to start writing with it. Its simplicity means you'll be productive immediately, and its power will grow with your needs." Use this cheat sheet as your guide and start creating! ✍️