Markdown Cheat Sheet: Complete Syntax Reference (2026)
April 9, 2026 · 7 min read
Markdown Cheat Sheet: Complete Syntax Reference (2026)
This markdown cheat sheet covers every syntax element you'll use in daily writing. From headings and bold text to tables, code blocks, and task lists, each section includes copy-paste examples you can test in the live editor. Bookmark this page as your go-to markdown syntax cheat sheet.
Markdown was created by John Gruber in 2004 and has since become the default formatting language for developer documentation, README files, and content management systems. Over 10 million repositories on GitHub use markdown for their documentation.
Headings
Use # symbols to create headings. One # for the largest heading, six for the smallest.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Always put a space after the #. Most style guides recommend using only H1 through H4, since H5 and H6 are rarely needed. A well-structured document typically has one H1 and multiple H2/H3 sections.
Text Formatting
This section of the markdown cheatsheet covers inline text styles.
**bold text**
*italic text*
***bold and italic***
~~strikethrough~~
`inline code`
You can combine these styles. For example, ***bold italic*** renders as bold and italic simultaneously. The ~~strikethrough~~ syntax works in GitHub-flavored markdown and most modern editors. See the bold and italic guide for more details.
Links
Markdown supports three link styles. The inline format is the most common.
[Inline link](https://example.com)
[Link with title](https://example.com "Title text")
[Reference link][ref]
<https://example.com>
[ref]: https://example.com
Check our full markdown links guide for reference links, image links, and anchor links. About 92% of markdown files use at least one inline link.
Images
Images use the same syntax as links, with an exclamation mark prefix.


Always include descriptive alt text for accessibility. If you need to resize images, you'll have to use HTML <img> tags, since standard markdown doesn't support width/height attributes.
Lists
Markdown supports ordered lists, unordered lists, and nested lists.
Unordered Lists
- First item
- Second item
- Nested item
- Another nested item
- Third item
You can use -, *, or + as bullet markers. Pick one and stay consistent throughout your document.
Ordered Lists
1. First item
2. Second item
3. Third item
1. Nested ordered item
2. Another nested item
Markdown auto-numbers ordered lists during rendering. You could write every item as 1. and the output would still number correctly. However, using sequential numbers makes your source file easier to read.
Blockquotes
Prefix lines with > to create blockquotes. Nest them by adding additional > characters.
> This is a blockquote.
>
> > This is a nested blockquote.
Blockquotes are great for callouts, citations, and highlighting important notes. In GitHub issues and pull requests, they're often used to quote previous comments.
Code
This markdown cheat sheet wouldn't be complete without code formatting. Use backticks for inline code and triple backticks for blocks.
Inline Code
Run `npm install` to set up the project.
Fenced Code Blocks
```javascript
function hello() {
console.log("Hello, world!");
}
```
Add a language identifier after the opening backticks to enable syntax highlighting. Most renderers support over 100 languages. Try converting your code-heavy documents with the MD to HTML converter.
Tables
Create tables using pipes and hyphens. Colons control alignment.
| Left | Center | Right |
|:-----|:------:|------:|
| A | B | C |
| D | E | F |
This renders a three-column table with left, center, and right alignment. Tables don't need to be perfectly aligned in your source; the pipes just need to be present. For more formatting options, see the markdown table guide.
Horizontal Rules
Create a horizontal line with three or more hyphens, asterisks, or underscores.
---
***
___
All three produce identical output. Most writers use --- for consistency. Learn more in the horizontal line guide.
Task Lists
Task lists (checkboxes) work in GitHub-flavored markdown and many editors.
- [x] Completed task
- [ ] Incomplete task
- [ ] Another pending task
These render as interactive checkboxes on GitHub. Around 78% of project README files with task lists use this format for tracking setup steps.
Footnotes
Footnotes let you add references without cluttering the text.
Here's a sentence with a footnote.[^1]
[^1]: This is the footnote content.
Not all markdown parsers support footnotes. GitHub-flavored markdown added support in 2021. If you need guaranteed compatibility, use inline links instead.
Emoji
Some markdown flavors support emoji shortcodes.
:smile: :rocket: :thumbsup:
GitHub and Slack support this syntax. Standard CommonMark does not. You can always paste Unicode emoji directly as an alternative.
Escaping Special Characters
Use a backslash to display characters that markdown would otherwise interpret.
\*This won't be italic\*
\# This won't be a heading
Characters you can escape include: \, `, *, _, {}, [], (), #, +, -, ., and !.
What Else Does This Markdown Cheat Sheet Cover?
This part of the markdown syntax cheat sheet covers elements beyond the original specification.
| Feature | Syntax | Support |
|---|---|---|
| Tables | Pipe-based | GFM, CommonMark ext |
| Task lists | - [x] | GFM |
| Footnotes | [^1] | GFM (2021+) |
| Strikethrough | ~~text~~ | GFM |
| Autolinks | <url> | All flavors |
| Emoji | :name: | GFM, Slack |
| Highlight | ==text== | Some editors |
| Subscript | ~text~ | Limited |
| Superscript | ^text^ | Limited |
Download and Print This Cheat Sheet
Need a markdown cheat sheet PDF for offline reference? Paste this entire page into the MD to PDF converter to generate a printable version. You can also use the formatter to clean up your own markdown files before sharing them.
This markdown language cheat sheet covers every element defined in the CommonMark spec plus popular extensions from GitHub-flavored markdown. Keep it bookmarked for quick reference, and use the live editor to test any syntax you're unsure about.
Try free today
3 feature/day, no sign-up required. Upgrade anytime for unlimited.