Markdown Cheat Sheet
Markdown is a lightweight markup language that allows you to format text using simple, readable syntax. This markdown cheatsheet provides a comprehensive reference for all essential Markdown features including headings, text formatting, lists, tables, code blocks, links, images, and more. Whether you're writing documentation, README files, or blog posts, this cheatsheet will help you master Markdown syntax quickly.
Headings
Headings are used to structure your document and create a hierarchy of content. Markdown supports six levels of headings, from H1 (largest) to H6 (smallest). Use headings to organize sections and make your document easier to navigate.
Syntax Example
# H1
## H2
### H3
#### H4
##### H5
###### H6
Text Formatting
Text formatting allows you to emphasize words and phrases to make them stand out. Use italic for subtle emphasis, bold for strong emphasis, and strikethrough to indicate deleted or irrelevant text. Highlighting can draw attention to important information.
Emphasis
*italic*
**bold**
***bold italic***
italic bold bold italic
Strikethrough
~~strikethrough~~
strikethrough
Highlight
==highlighted text==
highlighted text
Blockquotes
Blockquotes are used to quote text from another source or to highlight important information. You can nest blockquotes by adding additional > symbols, which is useful for indicating replies or nested quotations.
> This is a blockquote
>> Nested blockquote
This is a blockquote
Nested blockquote
Lists
Lists help organize information in a clear, structured way. Unordered lists are great for items without a specific sequence, while ordered lists are perfect for step-by-step instructions or ranked items. You can nest lists to create sub-items.
Unordered List
You can use -, *, or + for unordered lists:
- Item 1
- Item 2
- Nested Item
* Item with asterisk
* Another item
+ Item with plus
+ Another item
- Item 1
-
Item 2
- Nested Item
-
Item with asterisk
-
Another item
-
Item with plus
- Another item
Ordered List
1. First
2. Second
3. Third
- First
- Second
- Third
Task List
- [x] Completed
- [ ] Pending
- [x] Completed
- [ ] Pending
Code
Code formatting allows you to display programming code or commands clearly. Inline code is great for mentioning function names or variables within text, while code blocks are perfect for showing multi-line code examples with syntax highlighting.
Inline Code
Use `print()` function.
Use print() function.
Code Block
```python
def hello():
print("Hello World")
```
def hello():
print("Hello World")
Tables
Tables organize data in rows and columns, making it easy to present structured information. They're perfect for displaying comparisons, specifications, or any data that benefits from a grid layout.
| Name | Age | Role |
|------|-----|------|
| John | 30 | Dev |
| Jane | 25 | Ops |
| Name | Age | Role |
|---|---|---|
| John | 30 | Dev |
| Jane | 25 | Ops |
Links
Links allow you to reference other web pages, documents, or sections within your document. They make your content interactive and help readers navigate to related resources easily.
[CheatDocs](https://cheatdocs.org)
Images
Images enhance your document by adding visual content. You can include diagrams, screenshots, logos, or any visual elements that support your text.

Horizontal Rule
Horizontal rules create visual separators between sections of your document. They help break up content and improve readability by clearly dividing different topics or sections.
---
Emojis
Emojis add personality and visual interest to your text. They can help convey emotions, highlight important points, or make your content more engaging and friendly.
:rocket: :fire: :smile:
Footnotes
Footnotes allow you to add notes and references without cluttering the body of the document. When you create a footnote, a superscript number with a link appears where you added the footnote reference. Readers can click the link to jump to the content of the footnote at the bottom of the page.
Here is a footnote reference[^1].
[^1]: This is the footnote.
Here is a footnote reference1.
1. This is the footnote. ↩
Superscript & Subscript
Superscript and subscript are useful for mathematical formulas, chemical equations, or footnote markers. Subscript appears below the baseline (like in H₂O), while superscript appears above (like in E=mc²).
H~2~O
X^2^
H2O
X2
Definition List
Definition lists are perfect for glossaries, dictionaries, or any content where you need to pair terms with their descriptions. They provide a clear, structured way to present definitions.
Term 1
: Definition 1
Term 2
: Definition 2
- Term 1
- Definition 1
- Term 2
- Definition 2
HTML in Markdown
Markdown supports HTML tags, giving you more control over formatting when needed. This is useful for adding elements that don't have Markdown equivalents, like keyboard keys or custom styling.
<kbd>Ctrl</kbd> + <kbd>C</kbd>
Ctrl + C
Collapsible Details
Collapsible details (also called accordions) allow you to hide content that can be expanded when needed. This is great for FAQs, optional information, or keeping your document clean while still providing detailed content for interested readers.
<details>
<summary>Click to expand</summary>
Hidden content here.
</details>