Complete Markdown Cheat Sheet: Master the Syntax in 2026
Published February 4, 2026 • 10 min read
Markdown is the universal lightweight markup language for formatting text. Created in 2004, it's now the standard for documentation, README files, forums, and content management. This comprehensive cheat sheet covers everything from basics to advanced features.
Why Markdown?
- Easy to read: Plain text format readable even unrendered
- Universal: Supported by GitHub, Reddit, Discord, Slack, Notion, and thousands of apps
- Fast to write: No mouse needed, pure keyboard workflow
- Future-proof: Plain text files will always be accessible
- Version control friendly: Works perfectly with Git
Basic Syntax
Headings
# H1 Heading
## H2 Heading
### H3 Heading
#### H4 Heading
##### H5 Heading
###### H6 Heading
Alternative syntax for H1 and H2:
H1 Heading
==========
H2 Heading
----------
Emphasis
*italic* or _italic_
**bold** or __bold__
***bold and italic*** or ___bold and italic___
~~strikethrough~~
Result: italic, bold, bold and italic, strikethrough
Paragraphs
Separate paragraphs with a blank line:
This is paragraph one.
This is paragraph two.
Line Breaks
End a line with two spaces or use <br>:
First line
Second line
Or use HTML:
First line<br>
Second line
Lists
Unordered Lists
- Item one
- Item two
- Nested item
- Another nested item
- Item three
* Also works with asterisks
+ Or plus signs
Ordered Lists
1. First item
2. Second item
3. Third item
1. Nested item
2. Another nested item
Tip: Numbers don't have to be sequential—Markdown auto-numbers:
1. First
1. Second
1. Third
Task Lists (GitHub Flavored Markdown)
- [x] Completed task
- [ ] Incomplete task
- [ ] Another task
Links
Inline Links
[Link text](https://example.com)
[Link with title](https://example.com "Hover text")
Reference Links
Define links once, use them multiple times:
Check out [Google][1] and [GitHub][2].
[1]: https://google.com
[2]: https://github.com
Automatic Links
<https://example.com>
<[email protected]>
Anchor Links (Same Page)
[Jump to heading](#heading-name)
## Heading Name
Images
Inline Images


Reference Images
![Logo][logo]
[logo]: logo.png "Company logo"
Linked Images
[](https://example.com)
Code
Inline Code
Use `backticks` for inline code.
Code Blocks
```
Plain code block
No syntax highlighting
```
Syntax Highlighting
```javascript
function hello() {
console.log('Hello, world!');
}
```
```python
def hello():
print("Hello, world!")
```
Indented Code Blocks
Indent with 4 spaces or a tab:
This is a code block
Created by indenting
Tables
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |
Column Alignment
| Left | Center | Right |
|:-------|:-------:|--------:|
| Left | Center | Right |
| Text | Text | Text |
Blockquotes
> This is a blockquote.
> It can span multiple lines.
> Nested quotes:
> > Second level
> > > Third level
Horizontal Rules
---
***
___
HTML in Markdown
You can use HTML when Markdown syntax isn't enough:
<div align="center">
<img src="logo.png" width="200">
</div>
<details>
<summary>Click to expand</summary>
Hidden content here
</details>
<kbd>Ctrl</kbd> + <kbd>C</kbd>
Escaping Characters
Use backslash to escape Markdown characters:
\* Not italic \*
\# Not a heading
\[Not a link\](url)
Characters you can escape:
\ ` * _ { } [ ] ( ) # + - . !
Advanced Features (GitHub Flavored Markdown)
Footnotes
Here's a sentence with a footnote[^1].
[^1]: This is the footnote content.
Emoji
:smile: :heart: :rocket: :fire:
GitHub supports 100+ emoji shortcodes!
Mentions & References
@username - Mention a user
#123 - Link to issue/PR
SHA: 7d42e61 - Link to commit
Alerts (GitHub)
> [!NOTE]
> Useful information
> [!WARNING]
> Critical warning
> [!IMPORTANT]
> Key information
Mermaid Diagrams (GitHub)
```mermaid
graph TD
A[Start] --> B{Is it working?}
B -->|Yes| C[Great!]
B -->|No| D[Debug]
D --> A
```
Markdown Flavors
Different platforms support different Markdown features:
- CommonMark: Standard specification, most compatible
- GitHub Flavored Markdown (GFM): Tables, task lists, autolinks, strikethrough
- MultiMarkdown: Footnotes, tables, metadata
- Markdown Extra: Tables, definitions, abbreviations
Best Practices
1. Use Consistent Formatting
Pick one style and stick with it:
- Use
*or_for emphasis (not both) - Use
-,*, or+for lists (pick one) - Consistent heading hierarchy (don't skip levels)
2. Add Blank Lines
Improves readability and prevents rendering issues:
## Heading
Paragraph text.
- List item
- List item
Another paragraph.
3. Use Descriptive Link Text
❌ Click [here](url) to read more.
✅ Read our [developer documentation](url).
4. Alt Text for Images
❌ 
✅ 
5. Format Tables Nicely
Align columns for readability in raw text:
| Name | Age | City |
|-----------|-----|------------|
| Alice | 30 | London |
| Bob | 25 | Paris |
Common Mistakes
1. Missing Blank Lines
❌ Wrong:
## Heading
Text immediately after
✅ Correct:
## Heading
Text with blank line
2. Incorrect List Indentation
❌ Wrong (2 spaces):
- Item
- Nested (won't work)
✅ Correct (2-4 spaces):
- Item
- Nested item
3. Not Escaping Special Characters
❌ 2*3 = 6 (renders as 23 = 6)
✅ 2\*3 = 6 (renders correctly)
Testing Your Markdown
Use our free Markdown editor to write and preview Markdown in real-time. Perfect for:
- Writing GitHub README files
- Creating documentation
- Testing Markdown syntax
- Converting to HTML
Markdown Tools
Editors
- VS Code: Excellent built-in Markdown preview
- Typora: WYSIWYG Markdown editor
- Obsidian: Knowledge base with backlinks
- MarkText: Open-source, distraction-free
VS Code Extensions
- Markdown All in One
- Markdown Preview Enhanced
- markdownlint (syntax checker)
Online Editors
- Nyx Markdown Editor (ours!)
- Dillinger
- StackEdit
Quick Reference Table
| Element | Syntax |
|---|---|
| Heading | # H1 through ###### H6 |
| Bold | **bold** |
| Italic | *italic* |
| Link | [text](url) |
| Image |  |
| Code | `code` |
| List | - item or 1. item |
| Blockquote | > quote |
| HR | --- |
Conclusion
Markdown is deceptively simple yet incredibly powerful. Master the basics, learn advanced features as needed, and you'll be formatting documentation, README files, and notes faster than ever.
The best way to learn Markdown is to use it. Start with README files for your projects, take notes in Markdown, and soon the syntax will be second nature.
Practice Markdown Now
Use our free Markdown editor to practice syntax with live preview. Perfect for writing GitHub READMEs and documentation.