Markdown Cheat Sheet
Every Markdown element on one page: the raw syntax on the left, the rendered output on the right, and a copy button on each block.
What is the basic syntax of Markdown?
Markdown formats text with ordinary punctuation: # for headings, **text** for bold, *text* for italic, > for blockquotes, - or 1. for lists, backticks for code, [text](url) for links and  for images. Extended syntax adds tables, fenced code blocks, task lists, footnotes and strikethrough.
# Heading 1
**bold** *italic* ~~strikethrough~~
> Blockquote
- Bullet item
1. Numbered item
- [ ] Task item
`inline code`
[link](https://example.com)

| Column A | Column B |
| -------- | -------- |
| Cell | Cell |Renders an H1 heading, bold, italic and struck-through text, a quoted paragraph, a bulleted, a numbered and a checkbox list, inline code, a hyperlink, an image and a two-column table.
Try the Markdown Cheat Sheet
Basic Syntax
These are the elements outlined in John Gruber's original design document. All Markdown applications support these elements.
Headings
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Paragraphs
First paragraph. Text is separated by a blank line.
Second paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
look like:
* this one
* that one
* the other oneFirst paragraph. Text is separated by a blank line.
Second paragraph. Italic, bold, and monospace. Itemized lists
look like:
- this one
- that one
- the other one
Bold
**Bold text**
__Bold text__Bold text
Bold text
Italic
*Italic text*
_Italic text_Italic text
Italic text
Bold and Italic
***Bold and italic text***
___Bold and italic text___
__*Bold and italic text*__
**_Bold and italic text_**Bold and italic text
Bold and italic text
Bold and italic text
Bold and italic text
Blockquote
> This is a blockquote
>
> It can span multiple lines
> Nested blockquotes are also possible
> > Like this oneThis is a blockquote
It can span multiple lines
Nested blockquotes are also possible
Like this one
Ordered List
1. First item
2. Second item
3. Third item
1. Indented item
2. Indented item
4. Fourth item- First item
- Second item
- Third item
- Indented item
- Indented item
- Fourth item
Unordered List
- First item
- Second item
- Third item
- Indented item
- Indented item
- Fourth item
* Alternative syntax
* Using asterisks
* Instead of hyphens- First item
- Second item
- Third item
- Indented item
- Indented item
- Fourth item
- Alternative syntax
- Using asterisks
- Instead of hyphens
Inline Code
Use `code` in the middle of a sentence.Use code in the middle of a sentence.
Horizontal Rule
Three or more hyphens
---
Three or more asterisks
***
Three or more underscores
___Three or more hyphens
Three or more asterisks
Three or more underscores
Link
[MDUtil](https://mdutil.com)
[MDUtil with Title](https://mdutil.com "MDUtil's Homepage")
[Reference-style link][reference]
[reference]: https://mdutil.comImage



Extended Syntax
These elements extend the basic syntax by adding additional features. Not all Markdown applications support these elements.
Table
| Syntax | Description | Example |
| ----------- | ----------- | ------- |
| Header | Title | Header |
| Paragraph | Text | Content |
| List | Bullet points | • Item |
| Alignment | Left-aligned | Center-aligned | Right-aligned |
| --- | :--- | :---: | ---: |
| Example | Left | Center | Right |
| Values | Left | Center | Right || Syntax | Description | Example |
|---|---|---|
| Header | Title | Header |
| Paragraph | Text | Content |
| List | Bullet points | • Item |
| Alignment | Left-aligned | Center-aligned | Right-aligned |
|---|---|---|---|
| Example | Left | Center | Right |
| Values | Left | Center | Right |
Fenced Code Block
```javascript
function hello() {
console.log("Hello, world!");
}
// Comment
hello();
```
```python
def hello():
print("Hello, world!")
# Comment
hello()
```function hello() {
console.log("Hello, world!");
}
// Comment
hello();
def hello():
print("Hello, world!")
# Comment
hello()
Footnote
Here's a sentence with a footnote. [^1]
[^1]: This is the footnote content.
Text can have multiple footnotes [^2] [^3] as needed.
[^2]: Footnote 2 content.
[^3]: Footnote 3 content.Heading ID
### My Heading {#custom-id}My Heading {#custom-id}
Definition List
First Term
: Definition for first term.
Second Term
: Definition for second term.First Term
: Definition for first term.
Second Term
: Definition for second term.
Strikethrough
~~Strikethrough text~~Strikethrough text
Task List
- [x] Write the introduction
- [x] Create examples
- [ ] Make interactive components
- [ ] Add more documentation- Write the introduction
- Create examples
- Make interactive components
- Add more documentation
Emoji
:smile: :+1: :rocket: :octocat::smile: :+1: :rocket: :octocat:
Highlight
I need to ==highlight== this text.I need to ==highlight== this text.
Subscript
H~2~O is the chemical formula for water.H2O is the chemical formula for water.
Superscript
2^10^ equals 1024.2^10^ equals 1024.
Markdown syntax reference, element by element
Markdown splits into two layers. Basic syntax comes from John Gruber's original 2004 design and works in every parser. Extended syntax — tables, fenced code, task lists, footnotes — comes mostly from GitHub Flavored Markdown and CommonMark extensions, and support varies. The groups below cover both, along with the rules people most often get wrong.
Headings, paragraphs and line breaks
One to six hash characters set the heading level, and the space after the hashes is required. Paragraphs are separated by a blank line — a single newline is only a space in most parsers. To force a break inside a paragraph, end the line with two spaces or a backslash.
# Heading 1
## Heading 2
###### Heading 6
First paragraph.
Second paragraph with a hard break
on the line above.Produces h1, h2 and h6 elements, two separate paragraphs, and a <br> where the two trailing spaces appear.
Emphasis: bold, italic and strikethrough
One delimiter is italic, two are bold, three are both. Asterisks and underscores are interchangeable around whole words, but only asterisks work inside a word, because underscores appear in identifiers like snake_case. Strikethrough with double tildes is GFM, not core Markdown.
*italic* and _italic_
**bold** and __bold__
***bold italic***
~~struck through~~
un**bel**ievableRenders em, strong, nested strong+em, del, and bold applied to the middle of a single word.
Lists, nesting and task lists
Use -, * or + for bullets and any number followed by a dot for ordered lists; the renderer renumbers automatically, so 1. on every line is valid. Indent nested items by two to four spaces. A [ ] or [x] right after the bullet turns the item into a checkbox on GitHub-compatible platforms.
- First item
- Second item
- Nested item
1. First step
1. Second step
1. Third step
- [x] Done
- [ ] Not doneProduces a bulleted list with one nested level, an ordered list numbered 1 to 3, and a task list with one checked box.
Links, images and reference style
Inline links put the text in brackets and the URL in parentheses; an image is the same with a leading exclamation mark, where the bracketed text becomes alt text. Reference style moves URLs to the bottom of the document, which keeps long paragraphs readable. Bare URLs autolink in GFM.
[Inline link](https://example.com "Optional title")

[Reference link][docs]
[docs]: https://example.com/docsRenders a titled hyperlink, an image with alt text, and a second hyperlink resolved from the definition at the bottom.
Inline code, fenced blocks and escaping
Single backticks mark inline code; if the code itself contains a backtick, wrap it in double backticks. Fenced blocks use three backticks with an optional language hint that drives syntax highlighting. Nothing inside code is parsed as Markdown, which makes it the simplest way to show literal symbols.
Run `npm install` first.
Use ``a `b` c`` for nested backticks.
```js
function hello() {
console.log("Hello");
}
```
\*not italic\*Renders two inline code spans, a JavaScript block with highlighting, and the literal text *not italic* with visible asterisks.
Tables, footnotes and other extended syntax
Tables need a header row and a dash row; colons in the dash row set alignment. Footnotes, definition lists, heading IDs, highlighting, subscript and superscript are extensions — useful in Obsidian or a documentation generator, but they fall back to raw characters where they are unsupported.
| Left | Center | Right |
| :--- | :----: | ----: |
| a | b | c |
A claim that needs a source.[^1]
[^1]: The footnote text.
### Custom anchor {#custom-id}Renders a three-column table with left, centre and right alignment, a superscript footnote marker linked to a note at the end, and an h3 with the id custom-id where heading IDs are supported.
Which Markdown syntax works where
Basic syntax is safe everywhere. Extended syntax is where documents break: the same file can render perfectly in Obsidian and show raw symbols in a chat app. Check the target platform before you rely on anything below the Basic Syntax section.
| Platform | Support | Notes |
|---|---|---|
| GitHub / GitLab | Basic + most extended | Tables, task lists, strikethrough, footnotes and autolinks. No definition lists, highlight or sub/superscript. |
| Discord | Partial | Headings, lists, quotes, code blocks, spoilers and masked links. No tables, images or footnotes. |
| Slack | Partial | Uses its own mrkdwn: *bold*, _italic_, ~strike~. No headings, tables or images. |
| Obsidian | Basic + extended | Adds ==highlight==, callouts, [[wikilinks]], footnotes and LaTeX math. |
| Notion | Partial | Typing basic syntax converts as you type. Footnotes, definition lists and heading IDs are dropped on paste. |
| Partial | Tables, strikethrough and ^superscript^ work. No footnotes or heading IDs. | |
| VS Code preview | Basic + extended | CommonMark plus GFM tables, task lists and math; extensions cover the rest. |
How to use this Markdown cheat sheet
Find the element
Browse Basic Syntax for the elements every parser supports, or Extended Syntax for GitHub-era additions such as tables, footnotes and task lists.
Compare code with output
Each block shows the raw Markdown on the left and the live rendered result on the right, so you can confirm exactly what a symbol produces before using it.
Copy the snippet
Press the copy button in a block header to put that exact syntax on your clipboard.
Paste and adapt
Replace the placeholder text with your own. If you used extended syntax, check the compatibility table for your target platform first.
Frequently Asked Questions
What is Markdown?
Markdown is a lightweight markup language that formats plain text using ordinary punctuation. John Gruber created it in 2004 so documents stay readable in their raw form. A parser converts the text to HTML, which is why the same .md file renders on GitHub, in Obsidian, in static site generators and in many chat apps.
What is the difference between basic and extended Markdown syntax?
Basic syntax covers the original elements: headings, paragraphs, bold, italic, blockquotes, lists, code, horizontal rules, links and images. Every parser supports them. Extended syntax, popularised by GitHub Flavored Markdown, adds tables, fenced code blocks, footnotes, definition lists, strikethrough, task lists, emoji and heading IDs, and support varies by platform.
Is Markdown syntax the same on GitHub?
GitHub uses GitHub Flavored Markdown, a superset of CommonMark. All basic syntax behaves identically, and GFM adds tables, task lists, strikethrough, footnotes, automatically linked URLs and syntax highlighting in fenced code blocks. GFM does not support definition lists, highlighting with equals signs, or subscript and superscript.
How do I create a line break in Markdown?
End the line with two spaces before pressing Enter, or end it with a backslash. Both force a break inside the same paragraph. A single newline on its own is treated as a space by most parsers, and a blank line starts a new paragraph rather than a line break.
How do I make a table in Markdown?
Write a header row with cells separated by pipes, then a row of dashes, then one line per data row. Colons in the dash row set alignment: :--- is left, :---: is centre and ---: is right. Tables are extended syntax, so they need a GitHub Flavored Markdown compatible parser.
Can I use HTML inside Markdown?
Usually yes. Inline tags such as kbd or sub work inside a paragraph, and block-level HTML works when it is surrounded by blank lines. Markdown syntax is normally not parsed inside block-level HTML, and platforms such as GitHub sanitise tags, so scripts and style attributes are stripped.
How do I escape Markdown characters?
Put a backslash in front of the character. Escaping works for the characters Markdown treats specially, including backslash, backtick, asterisk, underscore, curly braces, square brackets, parentheses, hash, plus, minus, dot, exclamation mark and pipe. Wrapping the text in backticks also disables formatting.
Do I need a space after the hash in a Markdown heading?
Yes. In CommonMark and GitHub Flavored Markdown, #Heading renders as literal text while # Heading renders as a heading. The same rule applies to other block markers: a list item needs a space after the dash and a blockquote needs a space after the angle bracket.
What file extension do Markdown files use?
The standard extension is .md, and .markdown is equally valid. Both are plain text, so any editor can open them. GitHub renders README.md automatically, and static site generators expect .md, or .mdx when the file also contains components.
Why does my Markdown look different on another site?
Platforms implement different feature sets. Highlighting, subscript, superscript, footnotes and definition lists are extensions rather than standard Markdown, so a page that renders correctly in Obsidian can show raw symbols on GitHub or Reddit. Stick to basic syntax when a document has to travel between tools.