Markdown Cheatsheet

Quick reference guide for Markdown syntax with examples and previews

Headers

H1

Syntax
# Heading 1
Preview

This is a Heading 1

H2

Syntax
## Heading 2
Preview

This is a Heading 2

H3

Syntax
### Heading 3
Preview

This is a Heading 3

H4

Syntax
#### Heading 4
Preview

This is a Heading 4

Text Formatting

Bold

Syntax
**bold text**
Preview

This is bold

Italic

Syntax
*italic text*
Preview

This is italic

Bold & Italic

Syntax
***bold and italic***
Preview

This is bold and italic

Strikethrough

Syntax
~~strikethrough~~
Preview

This is strikethrough

Lists

Unordered List

Syntax
- Item
- Item
- Item
Preview
  • First item
  • Second item
  • Third item

Ordered List

Syntax
1. Item
2. Item
3. Item
Preview
  1. First item
  2. Second item
  3. Third item

Nested List

Syntax
- Item
  - Nested item
  - Nested item
Preview
  • Main item
    • Nested item 1
    • Nested item 2

Task List

Syntax
- [ ] Unchecked
- [x] Checked
Preview
  • Todo item
  • Completed item

Links & Images

Link

Syntax
[Link text](URL)

Image

Syntax
![Alt text](image.jpg)
Preview

Logo

Link with Title

Syntax
[Link](URL "Title")
Preview

Code

Inline Code

Syntax
`code`
Preview

Use console.log() to print

Code Block

Syntax
```
code here
```
Preview
const x = 10;
console.log(x);

Code Block with Language

Syntax
```language
code here
```
Preview
def hello():
    print('Hello')

Blockquotes

Blockquote

Syntax
> Quote
Preview

This is a quote

Multi-line Quote

Syntax
> Line 1
> Line 2
Preview

First line of quote Second line of quote

Nested Quote

Syntax
> Quote
>> Nested
Preview

Main quote

Nested quote

Tables

Basic Table

Syntax
| Col1 | Col2 |
|------|------|
| A    | B    |
Preview
NameAge
John25
Jane30

Aligned Table

Syntax
| Left | Center | Right |
|:-----|:------:|------:|
| A    | B      | C     |
Preview
LeftCenterRight
LCR

Horizontal Rules

Horizontal Rule

Syntax
---
Preview

Above


Below

Alternative

Syntax
***
Preview

Above


Below

About Markdown

Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents.

Created by John Gruber in 2004, Markdown is now one of the world's most popular markup languages.

This cheatsheet covers GitHub Flavored Markdown (GFM), which includes additional features like tables and task lists.

Quick Tips

Escaping: Use backslash (\) to escape Markdown characters: \*not italic\*

Line Breaks: End a line with two spaces for a line break

HTML: You can use HTML tags directly in Markdown

Blank Lines: Use blank lines to separate paragraphs and blocks

Frequently Asked Questions

What is a Markdown cheatsheet?

A Markdown cheatsheet is a quick reference guide that displays all the essential Markdown syntax elements with examples. It helps writers, developers, and content creators quickly look up the correct syntax for formatting text, creating lists, adding links and images, code blocks, tables, and other Markdown elements without memorizing every command.

What Markdown syntax is covered in this cheatsheet?

This comprehensive cheatsheet covers all essential Markdown syntax including headers (H1-H6), text formatting (bold, italic, strikethrough), lists (ordered, unordered, nested, task lists), links and images, inline and block code, blockquotes, tables with alignment, and horizontal rules. It also includes GitHub Flavored Markdown (GFM) features like task lists and tables.

How do I use the Markdown cheatsheet examples?

Each syntax example in the cheatsheet shows two panels: the Markdown syntax on the left and the rendered preview on the right. You can copy any syntax example using the 'Copy' button next to each item. The examples are ready to use - simply paste them into your Markdown editor and modify as needed. The live preview shows exactly how the syntax will render.

What are the most common Markdown elements?

The most commonly used Markdown elements include headers (# for H1, ## for H2, etc.), bold text (**text**), italic text (*text*), unordered lists (- item), ordered lists (1. item), links ([text](url)), images (![alt](url)), inline code (`code`), and code blocks (```code```). These cover the majority of documentation and content creation needs.

What is GitHub Flavored Markdown (GFM)?

GitHub Flavored Markdown (GFM) is an extension of standard Markdown with additional features commonly used on GitHub. GFM adds support for strikethrough text (~~text~~), task lists (- [ ] todo), tables with column alignment, automatic URL linking, and fenced code blocks with syntax highlighting. This cheatsheet includes all GFM features for comprehensive reference.

How do I format text with bold, italic, and strikethrough?

Markdown text formatting is simple: use **double asterisks** or __double underscores__ for bold, *single asterisks* or _single underscores_ for italic, ***triple asterisks*** for bold and italic combined, and ~~double tildes~~ for strikethrough. These can be combined and nested for various text styling effects in your documents.

How do I create code blocks and tables in Markdown?

For inline code, wrap text in single backticks: `code`. For code blocks, use triple backticks (```) with an optional language identifier for syntax highlighting: ```javascript. Tables use pipes and hyphens: | Header | Header | followed by |--------|--------| for separators, then | Cell | Cell | for data rows. Use colons for alignment: :--- (left), :---: (center), ---: (right).

Is my data safe when using this Markdown cheatsheet?

Yes, this Markdown cheatsheet is completely safe to use. It is a static reference guide that runs entirely in your browser with no data transmission. There is no server-side processing, no data storage, and no tracking. The copy-to-clipboard functionality only accesses your clipboard when you explicitly click the copy button. Your browsing and reference activities remain completely private.