Markdown Cheat Sheet: The Complete Guide for 2026
Markdown has become the universal language of formatted text on the web. Whether you're writing documentation on GitHub, crafting a post on Reddit, taking notes in Obsidian, or building content in a CMS, Markdown lets you create clean, readable, and well-structured text without touching HTML. This complete cheat sheet covers every Markdown syntax element you need to know, from basic formatting to advanced features, with practical examples you can copy and use immediately.
What is Markdown?
Markdown is a lightweight markup language created by John Gruber and Aaron Swartz in 2004. The original goal was simple: create a plain-text formatting syntax that could be easily converted to HTML while remaining readable in its raw form. Unlike HTML, where you wrap text in verbose tags like <strong> and <em>, Markdown uses intuitive characters like asterisks and hashes that make the source text almost as readable as the rendered output.
Today, Markdown is used virtually everywhere. GitHub uses it for README files, issues, and pull request descriptions. Reddit supports it in comments and posts. Notion, Obsidian, and Bear use it as their core note-taking syntax. Static site generators like Jekyll, Hugo, and Gatsby rely on Markdown for content. Even messaging platforms like Slack and Discord support subsets of Markdown for text formatting.
The beauty of Markdown is its portability. A .md file is just plain text, so it works on every operating system, every text editor, and every version control system. Once you learn the syntax, you can write formatted content anywhere without being locked into a proprietary tool or format.
Headings
Headings in Markdown are created by placing one or more hash symbols (#) before your heading text. The number of hashes determines the heading level, from H1 (largest) to H6 (smallest). Always include a space between the hash symbols and the heading text.
# Heading 1 ## Heading 2 ### Heading 3 #### Heading 4 ##### Heading 5 ###### Heading 6
For H1 and H2, there's an alternative syntax using underlines. Place equals signs (===) under text for H1, or dashes (---) for H2. However, the hash syntax is far more common and widely supported.
Heading 1 ========= Heading 2 ---------
Text Formatting
Markdown provides simple syntax for common text formatting options. You can combine these styles by nesting the characters together.
| Style | Syntax | Output |
|---|---|---|
| Bold | **bold text** | bold text |
| Italic | *italic text* | italic text |
| Bold + Italic | ***bold and italic*** | bold and italic |
| Strikethrough | ~~strikethrough~~ | |
| Inline Code | `inline code` | inline code |
You can also use underscores (_italic_ and __bold__) instead of asterisks. However, asterisks are recommended because they work consistently even in the middle of words, while underscores may not render correctly in some parsers when used mid-word.
Links and Images
Links
Links follow a simple pattern: the display text goes in square brackets, and the URL goes in parentheses immediately after.
[Link Text](https://example.com) [Link with Title](https://example.com "Hover text here") <https://example.com> (auto-linked URL) <user@example.com> (auto-linked email)
You can also use reference-style links, which are useful when the same URL appears multiple times in a document:
[Link Text][1] [Another Link][website] [1]: https://example.com [website]: https://example.com "Optional Title"
Images
Images use the same syntax as links but with an exclamation mark (!) at the beginning. The text in brackets becomes the alt text for accessibility.
  <!-- Image with a link --> [](https://example.com)
Lists
Unordered Lists
Use dashes (-), asterisks (*), or plus signs (+) to create bullet points. Be consistent within a single list.
- First item - Second item - Third item * Alternative syntax * Works the same way
Ordered Lists
Start each line with a number followed by a period. Interestingly, the actual numbers don't matter — Markdown will automatically number the list sequentially. However, it's good practice to use correct numbering for readability.
1. First item 2. Second item 3. Third item 1. This also works 1. All ones 1. Markdown auto-numbers them
Nested Lists
Indent items with two or four spaces (or a tab) to create nested sub-lists. You can mix ordered and unordered lists within nested structures.
1. Main item
- Sub-item A
- Sub-item B
- Sub-sub-item
2. Another main item
1. Numbered sub-item
2. Another numbered sub-itemCode Blocks
For inline code, wrap your text in single backticks. For multi-line code blocks, use triple backticks (fenced code blocks) with an optional language identifier for syntax highlighting.
Inline Code
Use the `console.log()` function to debug.
Fenced Code Blocks
Add the language name after the opening backticks to enable syntax highlighting. Most Markdown renderers support dozens of languages including javascript, python, html, css, bash, json, and more.
```javascript
function greet(name) {
return `Hello, ${name}!`;
}
```
```python
def greet(name):
return f"Hello, {name}!"
```
```html
<div class="container">
<h1>Hello World</h1>
</div>
```If you need to include backticks inside a code block, you can use more backticks for the fence (four or more) or indent the block by four spaces instead of using fences. Need to quickly preview how your Markdown code blocks render? Try our Markdown Editor for instant live previews.
Blockquotes
Blockquotes are created by placing a greater-than sign (>) before the text. They're commonly used for quoting external sources, highlighting important notes, or adding callouts in documentation.
> This is a blockquote. > It can span multiple lines. > First paragraph of the quote. > > Second paragraph of the quote.
Nested Blockquotes
You can nest blockquotes by adding additional greater-than signs. This is useful for representing threaded conversations or layered quotations.
> Outer quote >> Nested quote >>> Deeply nested quote
Blockquotes can contain other Markdown elements inside them, including headings, lists, code blocks, and even other blockquotes. This makes them versatile building blocks for structured content.
Tables
Tables are created using pipes (|) and hyphens (-). The second row is the separator row that defines column alignment. Colons control text alignment within columns.
| Left Aligned | Center Aligned | Right Aligned | | :----------- | :------------: | ------------: | | Cell 1 | Cell 2 | Cell 3 | | Cell 4 | Cell 5 | Cell 6 |
Here's what each alignment option means:
:---— Left-aligned (default):---:— Center-aligned---:— Right-aligned
The columns don't need to be perfectly aligned in your source text — most Markdown parsers are forgiving. However, aligning them makes your raw Markdown much more readable. If you're building complex tables, you might find it easier to write them in Markdown and then convert them using our Markdown to HTML Converter to get clean HTML output.
Horizontal Rules
Horizontal rules create a visual divider between sections of content. You can use any of these three methods — they all produce the same result:
--- (three hyphens) *** (three asterisks) ___ (three underscores)
Make sure to leave a blank line above and below the horizontal rule to avoid it being interpreted as a heading underline (in the case of hyphens). Three or more characters will work, so ----- and *** both produce the same divider.
Advanced Markdown
Beyond the basics, many Markdown processors support extended syntax features. These are part of specifications like GitHub Flavored Markdown (GFM) or CommonMark extensions. Support may vary depending on which platform or parser you're using.
Task Lists
Task lists (or checkbox lists) are widely supported on GitHub, GitLab, and many note-taking apps. They're perfect for to-do lists and project tracking.
- [x] Completed task - [x] Another finished item - [ ] Pending task - [ ] Future work
Footnotes
Footnotes let you add references without cluttering the main text. The footnote definition can be placed anywhere in the document — it will always render at the bottom.
Here is a sentence with a footnote.[^1] [^1]: This is the footnote content. You can also use named footnotes[^note] for clarity. [^note]: Named footnotes work the same way.
Definition Lists
Definition lists are supported by some Markdown processors including PHP Markdown Extra and Pandoc. They're useful for glossaries and term explanations.
Term 1 : Definition for term 1 Term 2 : Definition for term 2 : An alternate definition
Emoji Shortcodes
Many platforms like GitHub and Slack support emoji shortcodes in Markdown. Wrap the emoji name in colons to insert it.
:smile: :rocket: :thumbsup: :warning:
Escaping Characters
If you need to display a character that Markdown would normally interpret as formatting, precede it with a backslash (\). For example, \*not italic\* renders as *not italic* instead of applying italic formatting. Characters you can escape include: \ ` * _ { } [ ] ( ) # + - . ! and |.
Markdown Tools and Converters
While Markdown is designed to be written in any plain text editor, having the right tools can significantly boost your productivity. Live preview editors let you see the rendered output as you type, converters transform Markdown to other formats like HTML or PDF, and linters help catch formatting mistakes before you publish.
At Intellure, we've built several free tools specifically for Markdown workflows:
- Markdown Editor — A full-featured online editor with real-time preview. Write Markdown on the left, see the formatted output on the right, and export your work when you're done.
- Markdown to HTML Converter — Paste your Markdown and get clean, semantic HTML output instantly. Perfect for embedding Markdown content into websites, emails, or CMS platforms that require HTML.
- Diff Checker — Compare two versions of a Markdown document side by side to see exactly what changed. Useful for reviewing edits, tracking documentation updates, or debugging formatting issues.
All of these tools run entirely in your browser — no sign-up required, no data sent to any server. They're designed for speed and privacy, so you can use them with confidence on any content, including proprietary documentation and sensitive notes.
Quick Reference Table
Here's a compact reference table you can bookmark for everyday use:
| Element | Markdown Syntax |
|---|---|
| Heading | # H1 ## H2 ### H3 |
| Bold | **bold** |
| Italic | *italic* |
| Link | [text](url) |
| Image |  |
| Unordered List | - item |
| Ordered List | 1. item |
| Code (inline) | `code` |
| Code Block | ```language ... ``` |
| Blockquote | > quote |
| Horizontal Rule | --- |
| Task List | - [x] done - [ ] todo |
| Footnote | text[^1] [^1]: note |
Frequently Asked Questions
What is the difference between Markdown and HTML?
Markdown is a simplified syntax that gets converted into HTML. While HTML uses tags like <strong> and <h1>, Markdown uses intuitive shorthand like **bold** and # Heading. Markdown is faster to write and more readable as plain text, but HTML offers more control over layout and styling. Most Markdown processors actually allow you to mix raw HTML into your Markdown when you need features that Markdown doesn't support natively. If you need to convert between the two, our Markdown to HTML Converter handles the transformation instantly.
Does Markdown support colors or custom fonts?
Standard Markdown does not support colors, custom fonts, or advanced styling. It's intentionally limited to structural formatting — headings, bold, italic, lists, links, and so on. If you need colors or custom fonts, you'll need to either embed raw HTML with inline styles (where supported) or apply CSS styling to the rendered output. Some platforms like GitHub limit which HTML tags are allowed for security reasons.
What file extension should I use for Markdown files?
The standard extension is .md, though .markdown is also recognized. The .md extension is far more common and universally supported by editors, syntax highlighters, and platforms. Some projects use .mdx for MDX files, which extend Markdown with JSX component support — a format popular in React-based documentation sites.
Which Markdown flavor should I use?
For most use cases, GitHub Flavored Markdown (GFM) is the safest choice. It extends the original Markdown spec with tables, task lists, strikethrough, and fenced code blocks — features that have become essential. CommonMark is a strict standardization effort that removes ambiguities from the original spec. If you're writing for a specific platform, check their documentation for which flavor they support. Most modern tools support GFM or a superset of it.
Can I use Markdown in email?
Most email clients don't render Markdown natively. However, you can write your content in Markdown and then convert it to HTML before pasting it into your email composer. Tools like our Markdown to HTML Converter make this workflow seamless. Some email applications and browser extensions also add Markdown support directly to the compose window, letting you write in Markdown and send as formatted HTML.
Try These Free Tools
Related Articles
5 Free Online Tools Every Developer Needs
Discover the essential free online tools that every developer should bookmark — from JSON formatting and regex testing to Base64 encoding and UUID generation.
JSON Formatting and Validation: A Developer's Quick Guide
A practical guide to JSON formatting, validation, and common mistakes. Learn JSON best practices and how to convert between JSON and CSV quickly.
JSON vs YAML: Differences, Use Cases, and When to Use Each
A practical comparison of JSON and YAML — syntax differences, strengths, weaknesses, and when to use each format for configuration, APIs, and data exchange.