Markdown Cheat Sheet
A comprehensive guide to Markdown syntax with live examples and rendered outputs. Master both basic and extended Markdown features to create beautiful formatted text.
Quick Reference
Jump to any syntax category to get started quickly
Basic Syntax
(13 items)Extended Syntax
(15 items)Basic Syntax
Essential Markdown elements supported by all Markdown applications. These form the foundation of Markdown formatting and are universally compatible.
Inline Elements
Bold Text
inlineMake text bold using double asterisks or double underscores around the text.
Markdown Input
**This is bold text**
__This is also bold text__
Rendered Output
This is bold text
This is also bold text
💡 Tips
- Use ** for better compatibility across applications
- Avoid spaces between the asterisks and text
- Can be combined with other inline elements
Italic Text
inlineMake text italic using single asterisks or single underscores around the text.
Markdown Input
*This is italic text*
_This is also italic text_
Rendered Output
This is italic text
This is also italic text
💡 Tips
- Use * for better compatibility across applications
- Avoid spaces between the asterisks and text
- Can be combined with bold formatting
Inline Code
inlineWrap a short code snippet or command in single backticks to display it as inline code.
Markdown Input
`const x = 42;`
Rendered Output
const x = 42;
💡 Tips
- If the code contains a backtick, wrap with multiple backticks (e.g., `` `nested` ``).
- Use inline code for short commands, filenames, or variable names without line breaks.
Links
inlineCreate links using square brackets for the link text and parentheses for the URL. Optional title in quotes inside parentheses.
Markdown Input
[Visit ToMarkdown](https://tomarkdown.dev "To Markdown Homepage")
[Simple link](https://tomarkdown.dev)
Rendered Output
💡 Tips
- Add optional titles with quotes in the parentheses
- URLs can be relative or absolute
- Use reference-style links for better readability
Block Elements
Headings
blockCreate section headings of different levels using hash symbols (#). The number of hash symbols corresponds to the heading level.
Markdown Input
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Rendered Output
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
💡 Tips
- Always put a space between the # and the heading text
- For compatibility, add blank lines before and after headings
- Alternative syntax: Use === under text for h1 and --- for h2
Paragraphs
blockCreate paragraphs by separating text with one or more blank lines. Maintain consistent indentation for proper formatting.
Markdown Input
This is the first paragraph.
This is the second paragraph.
This is the third paragraph.
Rendered Output
This is the first paragraph.
This is the second paragraph.
This is the third paragraph.
💡 Tips
- Don't indent paragraphs with spaces or tabs
- Use blank lines to separate paragraphs
- Avoid using non-breaking spaces for indentation
Blockquotes
blockCreate blockquotes using the > symbol. Blockquotes can contain multiple paragraphs and nested content.
Markdown Input
> This is a blockquote
>
> It can span multiple paragraphs.
>
>> This is a nested blockquote.
Rendered Output
This is a blockquote
It can span multiple paragraphs.
This is a nested blockquote.
💡 Tips
- Add a > before each paragraph in a blockquote
- Blockquotes can contain other Markdown elements
- Use multiple > symbols for nesting blockquotes
Lists (Unordered)
blockCreate unordered lists using -, *, or + as bullet points. Nest items by indenting with spaces or tabs.
Markdown Input
- First item
- Second item
- Nested item 1
- Nested item 2
- Third item
Rendered Output
- First item
- Second item
- Nested item 1
- Nested item 2
- Third item
💡 Tips
- Use consistent symbols for list items at each level
- Indent nested items with 4 spaces or 1 tab
- You can mix different symbols for different levels
Lists (Ordered)
blockCreate ordered lists using numbers followed by periods. The actual numbers don't matter - Markdown will order them correctly.
Markdown Input
1. First item
2. Second item
1. Nested item 1
2. Nested item 2
3. Third item
Rendered Output
- First item
- Second item
- Nested item 1
- Nested item 2
- Third item
💡 Tips
- Numbers don't have to be in order, but should start with 1
- Indent nested items with 4 spaces or 1 tab
- You can mix ordered and unordered lists
Code Blocks (Indented)
blockCreate code blocks by indenting each line with 4 spaces or 1 tab.
Markdown Input
function greet(name) {
console.log("Hello, " + name);
}
Rendered Output
function greet(name) {
console.log("Hello, " + name);
}
💡 Tips
- Indent every line of the code block with at least 4 spaces
- Leave blank lines before and after the code block
- No syntax highlighting available with this method
Fenced Code Blocks
blockCreate code blocks with syntax highlighting using triple backticks. Specify the programming language after the opening backticks.
Markdown Input
```javascript
function greet(name) {
console.log(`Hello, ${name}!`);
}
```
Rendered Output
function greet(name) { console.log(`Hello, ${name}!`);}
💡 Tips
- Specify the language for syntax highlighting
- Use indentation for better readability
- Escape backticks within code blocks using different numbers of backticks
Images
blockInsert an image by using an exclamation mark followed by alt text in brackets and the URL in parentheses.
Markdown Input

Rendered Output
💡 Tips
- Alt text improves accessibility and SEO if the image cannot load.
- For reference-style, define at bottom: ![Example][img1] ... [img1]: https://github.githubassets.com/assets/GitHub-Logo-ee398b662d42.png "Title".
Horizontal Rule
blockCreate a visual separator by placing at least three hyphens (---), asterisks (***), or underscores (___) on a single line.
Markdown Input
---
***
___
Rendered Output
💡 Tips
- At least three characters are required, but you can use more (e.g., ------).
- Leave a blank line before and after for maximum compatibility.
Extended Syntax
Advanced Markdown features that enhance basic syntax with additional functionality. Support varies across different platforms and processors.
Inline Elements
Strikethrough
inlineStrike through text using double tildes (~) around the text.
Markdown Input
~~This text is crossed out~~
Rendered Output
This text is crossed out
Supported Platforms
💡 Tips
- Supported by GitHub Flavored Markdown (GFM)
- Not supported in all Markdown processors
- Can be combined with other inline formatting
Highlight
inlineHighlight text using double equal signs (==) around the text.
Markdown Input
==This text is highlighted==
Rendered Output
This text is highlighted
Supported Platforms
💡 Tips
- Not widely supported across all platforms
- Alternative: use HTML <mark> tags directly
- Some processors use different syntax like ^^ or ++
Subscript
inlineCreate subscript text using tilde (~) around the text.
Markdown Input
H~2~O
Rendered Output
H2O
Supported Platforms
💡 Tips
- Not supported in standard Markdown
- Available in some extended processors
- Alternative: use HTML <sub> tags
Superscript
inlineCreate superscript text using caret (^) around the text.
Markdown Input
X^2^
Rendered Output
X2
Supported Platforms
💡 Tips
- Not supported in standard Markdown
- Available in some extended processors
- Alternative: use HTML <sup> tags
Emoji
inlineInsert emojis using colon syntax with emoji shortcodes.
Markdown Input
:smile: :heart: :thumbsup:
Rendered Output
😄 ❤️ 👍
Supported Platforms
💡 Tips
- Supported by GitHub, Discord, and many platforms
- Shortcode names vary between platforms
- Can also use Unicode emoji directly
Automatic URL Linking
inlineAutomatically convert URLs and email addresses to clickable links.
Markdown Input
Visit https://tomarkdown.dev or email test@example.com
Rendered Output
Visit https://tomarkdown.dev or email test@example.com
Supported Platforms
💡 Tips
- Part of GitHub Flavored Markdown (GFM)
- Automatically detects URLs and email addresses
- May conflict with other text in some cases
Block Elements
Tables
blockCreate tables using pipes (|) to separate columns and hyphens (-) to separate headers from content.
Markdown Input
| Name | Age | City |
|---------|-----|----------|
| Alice | 30 | New York |
| Bob | 25 | London |
Rendered Output
Name | Age | City |
---|---|---|
Alice | 30 | New York |
Bob | 25 | London |
Supported Platforms
💡 Tips
- Part of GitHub Flavored Markdown (GFM)
- Use colons (:) in header separator for alignment
- Outer pipes are optional
Task Lists
blockCreate interactive checkboxes using list syntax with [ ] for unchecked and [x] for checked items.
Markdown Input
- [x] Completed task
- [ ] Incomplete task
- [ ] Another task
Rendered Output
- Completed task
- Incomplete task
- Another task
Supported Platforms
💡 Tips
- Part of GitHub Flavored Markdown (GFM)
- Can be nested within other lists
- Interactive on supported platforms
Footnotes
blockCreate footnotes using [^identifier] for the reference and [^identifier]: for the definition.
Markdown Input
This text has a footnote[^1].
[^1]: This is the footnote content.
Supported Platforms
💡 Tips
- Supported by many extended Markdown processors
- Footnote definitions can be placed anywhere in the document
- Identifiers can be numbers, words, or phrases
Definition Lists
blockCreate definition lists using terms on one line and definitions indented on the next line.
Markdown Input
Term 1
: Definition for term 1
Term 2
: Definition for term 2
: Another definition for term 2
Rendered Output
- Term 1
- Definition for term 1
- Term 2
- Definition for term 2
- Another definition for term 2
Supported Platforms
💡 Tips
- Not widely supported across all platforms
- Definitions must be indented with spaces or tabs
- Multiple definitions per term are allowed
Admonitions/Callouts
blockCreate highlighted boxes for notes, warnings, tips, etc. using special syntax.
Markdown Input
!!! note "Optional Title"
This is a note admonition.
!!! warning
This is a warning!
Rendered Output
Optional Title
This is a note admonition.
Warning
This is a warning!
Supported Platforms
💡 Tips
- Syntax varies between processors (!!!, :::, > [!NOTE])
- Common in documentation platforms like MkDocs
- Types include note, warning, tip, info, danger
Math Expressions (LaTeX)
blockRender mathematical expressions using LaTeX syntax with dollar signs.
Markdown Input
Inline math: $E = mc^2$
Block math:
$
\sum_{i=1}^{n} x_i = x_1 + x_2 + \cdots + x_n
$
Rendered Output
Inline math:
Block math:
Supported Platforms
💡 Tips
- Requires MathJax or KaTeX for rendering
- Single $ for inline, double $ for block
- Backslash escaping may be needed
Collapsible Sections
blockCreate expandable/collapsible content sections using HTML details and summary tags.
Markdown Input
<details>
<summary>Click to expand</summary>
This content is hidden by default.
- Item 1
- Item 2
</details>
Rendered Output
Click to expand
This content is hidden by default.
- Item 1
- Item 2
Supported Platforms
💡 Tips
- Uses HTML tags but Markdown content inside
- Supported on GitHub and many platforms
- Great for FAQ sections and long content
Keyboard Keys
blockDisplay keyboard shortcuts using <kbd> HTML tags.
Markdown Input
Press <kbd>Ctrl</kbd> + <kbd>C</kbd> to copy.
Rendered Output
Press Ctrl + C to copy.
Supported Platforms
💡 Tips
- Pure HTML, not Markdown syntax
- Widely supported for representing keyboard input
- Can be styled with CSS for better appearance
Abbreviations
blockDefine abbreviations that show full text on hover.
Markdown Input
The HTML specification is maintained by the W3C.
*[HTML]: HyperText Markup Language
*[W3C]: World Wide Web Consortium
Rendered Output
The HTML specification is maintained by the W3C.
Supported Platforms
💡 Tips
- Not widely supported across all platforms
- Definitions can be placed anywhere in the document
- Shows tooltip on hover in supported renderers
Explore More Cheatsheets
Discover specialized Markdown guides for different platforms and use cases